@sentio/runtime 4.0.0 → 4.0.1-rc.2
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/dist/esm-CSGQo6hb.js +1773 -0
- package/dist/esm-CSGQo6hb.js.map +1 -0
- package/dist/execAsync-DiFDE921.js +14 -0
- package/dist/execAsync-DiFDE921.js.map +1 -0
- package/dist/getMachineId-bsd-57c_YWfQ.js +30 -0
- package/dist/getMachineId-bsd-57c_YWfQ.js.map +1 -0
- package/dist/getMachineId-darwin-dyf00K_U.js +27 -0
- package/dist/getMachineId-darwin-dyf00K_U.js.map +1 -0
- package/dist/getMachineId-linux-p9niCx07.js +23 -0
- package/dist/getMachineId-linux-p9niCx07.js.map +1 -0
- package/dist/getMachineId-unsupported-hKbFGxhH.js +18 -0
- package/dist/getMachineId-unsupported-hKbFGxhH.js.map +1 -0
- package/dist/getMachineId-win-Bn6Q0xbV.js +29 -0
- package/dist/getMachineId-win-Bn6Q0xbV.js.map +1 -0
- package/dist/index.d.ts +2780 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin-BrBSx4KR.d.ts +111 -0
- package/dist/plugin-BrBSx4KR.d.ts.map +1 -0
- package/dist/plugin-Tb-OZb_A.js +6937 -0
- package/dist/plugin-Tb-OZb_A.js.map +1 -0
- package/dist/processor-runner.d.ts +1 -0
- package/dist/processor-runner.js +57749 -0
- package/dist/processor-runner.js.map +1 -0
- package/dist/service-v3-CtXk2PFI.js +12238 -0
- package/dist/service-v3-CtXk2PFI.js.map +1 -0
- package/package.json +9 -8
- package/src/tsdown.config.ts +29 -0
- package/lib/chunk-AUPVVLD3.js +0 -3
- package/lib/chunk-AUPVVLD3.js.map +0 -1
- package/lib/chunk-GIDETKWP.js +0 -3
- package/lib/chunk-GIDETKWP.js.map +0 -1
- package/lib/chunk-OWUO6IOO.js +0 -4
- package/lib/chunk-OWUO6IOO.js.map +0 -1
- package/lib/chunk-TW627LH5.js +0 -3
- package/lib/chunk-TW627LH5.js.map +0 -1
- package/lib/chunk-ZBEAD3P3.js +0 -15
- package/lib/chunk-ZBEAD3P3.js.map +0 -1
- package/lib/getMachineId-bsd-D4LAJDEF.js +0 -3
- package/lib/getMachineId-bsd-D4LAJDEF.js.map +0 -1
- package/lib/getMachineId-darwin-LI2YUJNR.js +0 -4
- package/lib/getMachineId-darwin-LI2YUJNR.js.map +0 -1
- package/lib/getMachineId-linux-U5ITOJBK.js +0 -3
- package/lib/getMachineId-linux-U5ITOJBK.js.map +0 -1
- package/lib/getMachineId-unsupported-5HCFSWXA.js +0 -3
- package/lib/getMachineId-unsupported-5HCFSWXA.js.map +0 -1
- package/lib/getMachineId-win-MPVRXIQL.js +0 -3
- package/lib/getMachineId-win-MPVRXIQL.js.map +0 -1
- package/lib/index.d.ts +0 -1750
- package/lib/index.js +0 -3
- package/lib/index.js.map +0 -1
- package/lib/plugin-D-rx1WCp.d.ts +0 -108
- package/lib/processor-runner.d.ts +0 -1
- package/lib/processor-runner.js +0 -184
- package/lib/processor-runner.js.map +0 -1
- package/src/tsup.config.ts +0 -17
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2780 @@
|
|
|
1
|
+
import { a as IDataBindingContext, c as timeoutError, i as DataBindingContext, n as PluginManager, o as IStoreContext, r as AbstractStoreContext, s as StoreContext, t as Plugin } from "./plugin-BrBSx4KR.js";
|
|
2
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
|
+
import { DataBinding, EthCallParam, ExecutionConfigSchema, HandlerType, ProcessConfigRequest, ProcessResult, ProcessStreamRequest, ProcessStreamResponseV3Schema, ProcessorV3, StartRequest, UpdateTemplatesRequest } from "@sentio/protos";
|
|
4
|
+
import { Subject } from "rxjs";
|
|
5
|
+
import { MessageInitShape } from "@bufbuild/protobuf";
|
|
6
|
+
import { Required } from "utility-types";
|
|
7
|
+
import { HandlerContext, ServiceImpl } from "@connectrpc/connect";
|
|
8
|
+
|
|
9
|
+
//#region src/state.d.ts
|
|
10
|
+
declare class State {
|
|
11
|
+
stateMap: Map<string, any>;
|
|
12
|
+
static INSTANCE: State;
|
|
13
|
+
static reset(): void;
|
|
14
|
+
}
|
|
15
|
+
declare abstract class StateStorage<T> {
|
|
16
|
+
protected constructor();
|
|
17
|
+
abstract initValue(): T;
|
|
18
|
+
key(): string;
|
|
19
|
+
getOrRegister(): T;
|
|
20
|
+
unregister(): T;
|
|
21
|
+
}
|
|
22
|
+
declare abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {
|
|
23
|
+
initValue(): Map<string, T>;
|
|
24
|
+
getValue(key: string): T | undefined;
|
|
25
|
+
getValues(): T[];
|
|
26
|
+
getOrSetValue(key: string, value: T): T;
|
|
27
|
+
}
|
|
28
|
+
declare abstract class ListStateStorage<T> extends StateStorage<T[]> {
|
|
29
|
+
initValue(): never[];
|
|
30
|
+
getValues(): T[];
|
|
31
|
+
addValue(value: T): T;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/utils.d.ts
|
|
35
|
+
declare function mergeProcessResults(results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
|
36
|
+
declare function mergeProcessResultsInPlace(res: ProcessResult, results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
|
37
|
+
declare function recordRuntimeInfo(results: ProcessResult, handlerType: HandlerType): void;
|
|
38
|
+
declare function errorString(e: unknown): string;
|
|
39
|
+
declare const USER_PROCESSOR = "user_processor";
|
|
40
|
+
declare function makeEthCallKey(param: EthCallParam): string;
|
|
41
|
+
type Semver = {
|
|
42
|
+
semVer?: string;
|
|
43
|
+
major: number;
|
|
44
|
+
minor: number;
|
|
45
|
+
patch: number;
|
|
46
|
+
prerelease?: string;
|
|
47
|
+
buildmetadata?: string;
|
|
48
|
+
};
|
|
49
|
+
declare function parseSemver(version: string): Semver;
|
|
50
|
+
declare function compareSemver(a: Semver, b: Semver): number;
|
|
51
|
+
declare function locatePackageJson(pkgId: string): any;
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/endpoints.d.ts
|
|
54
|
+
/**
|
|
55
|
+
* Resolved RPC endpoint for a chain: the base URL plus optional HTTP headers
|
|
56
|
+
* attached to every request, e.g. the `X-Forwarded-Host` routing key for the Sui
|
|
57
|
+
* gRPC client talking to the Sentio rpc-node.
|
|
58
|
+
*/
|
|
59
|
+
interface ChainRpc {
|
|
60
|
+
url: string;
|
|
61
|
+
headers?: Record<string, string>;
|
|
62
|
+
}
|
|
63
|
+
declare class Endpoints {
|
|
64
|
+
static INSTANCE: Endpoints;
|
|
65
|
+
concurrency: number;
|
|
66
|
+
priceFeedAPI: string;
|
|
67
|
+
chainRpc: Map<string, ChainRpc>;
|
|
68
|
+
batchCount: number;
|
|
69
|
+
/** Convenience accessor for callers that only need the endpoint URL. */
|
|
70
|
+
getChainRpcUrl(chainId: string): string | undefined;
|
|
71
|
+
}
|
|
72
|
+
declare function configureEndpoints(options: any): void;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/chain-config.d.ts
|
|
75
|
+
interface RpcConfig {
|
|
76
|
+
Url: string;
|
|
77
|
+
Headers?: Record<string, string>;
|
|
78
|
+
}
|
|
79
|
+
interface ChainConfig {
|
|
80
|
+
ChainID: string;
|
|
81
|
+
Https?: string[];
|
|
82
|
+
Rpc?: RpcConfig;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region ../../node_modules/.pnpm/@commander-js+extra-typings@14.0.0_commander@14.0.0/node_modules/@commander-js/extra-typings/index.d.ts
|
|
86
|
+
// eslint complains about {} as a type, but hard to be more accurate.
|
|
87
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
88
|
+
type TrimRight<S extends string> = S extends `${infer R} ` ? TrimRight<R> : S;
|
|
89
|
+
type TrimLeft<S extends string> = S extends ` ${infer R}` ? TrimLeft<R> : S;
|
|
90
|
+
type Trim<S extends string> = TrimLeft<TrimRight<S>>;
|
|
91
|
+
type CamelCase<S extends string> = S extends `${infer W}-${infer Rest}` ? CamelCase<`${W}${Capitalize<Rest>}`> : S; // This is a trick to encourage TypeScript to resolve intersections for displaying,
|
|
92
|
+
// like { a: number } & { b : string } => { a: number, b: string }
|
|
93
|
+
// References:
|
|
94
|
+
// - https://github.com/sindresorhus/type-fest/blob/main/source/simplify.d.ts
|
|
95
|
+
// - https://effectivetypescript.com/2022/02/25/gentips-4-display/
|
|
96
|
+
type Resolve<T> = T extends infer O ? { [K in keyof O]: O[K] } : never; // This is a trick to encourage editor to suggest the known literals while still
|
|
97
|
+
// allowing any BaseType value.
|
|
98
|
+
// References:
|
|
99
|
+
// - https://github.com/microsoft/TypeScript/issues/29729
|
|
100
|
+
// - https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts
|
|
101
|
+
// - https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
|
|
102
|
+
type LiteralUnion<LiteralType, BaseType extends string | number> = LiteralType | (BaseType & Record<never, never>); // Side note: not trying to represent arrays as non-empty, keep it simple.
|
|
103
|
+
// https://stackoverflow.com/a/56006703/1082434
|
|
104
|
+
type InferVariadic<S extends string, ArgT> = S extends `${string}...` ? ArgT[] : ArgT;
|
|
105
|
+
type InferArgumentType<Value extends string, DefaultT, CoerceT, ChoicesT> = [CoerceT] extends [undefined] ? InferVariadic<Value, [ChoicesT] extends [undefined] ? string : ChoicesT> | DefaultT : [ChoicesT] extends [undefined] ? CoerceT | DefaultT : CoerceT | DefaultT | ChoicesT; // Special handling for optional variadic argument, won't be undefined as implementation returns [].
|
|
106
|
+
type InferArgumentOptionalType<Value extends string, DefaultT, CoerceT, ChoicesT> = Value extends `${string}...` ? InferArgumentType<Value, [DefaultT] extends [undefined] ? never : DefaultT, CoerceT, ChoicesT> : InferArgumentType<Value, DefaultT, CoerceT, ChoicesT>; // ArgRequired comes from .argRequired()/.argOptional(), and ArgRequiredFromUsage is implied by usage <required>/[optional]
|
|
107
|
+
type ResolveRequired<ArgRequired extends boolean | undefined, ArgRequiredFromUsage extends boolean> = ArgRequired extends undefined ? ArgRequiredFromUsage : ArgRequired;
|
|
108
|
+
type InferArgumentTypeResolvedRequired<Value extends string, DefaultT, CoerceT, ArgRequired extends boolean, ChoicesT> = ArgRequired extends true ? InferArgumentType<Value, never, CoerceT, ChoicesT> : InferArgumentOptionalType<Value, DefaultT, CoerceT, ChoicesT>; // Resolve whether argument required, and strip []/<> from around value.
|
|
109
|
+
type InferArgument<S extends string, DefaultT = undefined, CoerceT = undefined, ArgRequired extends boolean | undefined = undefined, ChoicesT = undefined> = S extends `<${infer Value}>` ? InferArgumentTypeResolvedRequired<Value, DefaultT, CoerceT, ResolveRequired<ArgRequired, true>, ChoicesT> : S extends `[${infer Value}]` ? InferArgumentTypeResolvedRequired<Value, DefaultT, CoerceT, ResolveRequired<ArgRequired, false>, ChoicesT> : InferArgumentTypeResolvedRequired<S, DefaultT, CoerceT, ResolveRequired<ArgRequired, true>, ChoicesT>;
|
|
110
|
+
// the implementation fallback is treat as <required>
|
|
111
|
+
type InferArguments<S extends string> = S extends `${infer First} ${infer Rest}` ? [InferArgument<First>, ...InferArguments<TrimLeft<Rest>>] : [InferArgument<S>];
|
|
112
|
+
type InferCommandArguments<S extends string> = S extends `${string} ${infer Args}` ? InferArguments<TrimLeft<Args>> : [];
|
|
113
|
+
type FlagsToFlag<Flags extends string> = Flags extends `${string},${infer LongFlag}` ? TrimLeft<LongFlag> : Flags extends `${string}|${infer LongFlag}` ? TrimLeft<LongFlag> : Flags extends `${string} ${infer LongFlag}` ? TrimLeft<LongFlag> : Flags;
|
|
114
|
+
type ConvertFlagToName<Flag extends string> = Flag extends `--no-${infer Name}` ? CamelCase<Name> : Flag extends `--${infer Name}` ? CamelCase<Name> : Flag extends `-${infer Name}` ? CamelCase<Name> : never;
|
|
115
|
+
type CombineOptions<Options, O> = keyof O extends keyof Options ? { [K in keyof Options]: K extends keyof O ? Options[K] | O[keyof O] : Options[K] } : Options & O;
|
|
116
|
+
type IsAlwaysDefined<DefaulT, Mandatory extends boolean> = Mandatory extends true ? true : [undefined] extends [DefaulT] ? false : true; // Modify PresetT to take into account negated.
|
|
117
|
+
type NegatePresetType<Flag extends string, PresetT> = Flag extends `--no-${string}` ? undefined extends PresetT ? false : PresetT : undefined extends PresetT ? true : PresetT; // Modify DefaultT to take into account negated.
|
|
118
|
+
type NegateDefaultType<Flag extends string, DefaultT> = Flag extends `--no-${string}` ? [undefined] extends [DefaultT] ? true : DefaultT : [undefined] extends [DefaultT] ? never : DefaultT; // don't add undefined, will make property optional later
|
|
119
|
+
// Modify ValueT to take into account coerce function.
|
|
120
|
+
type CoerceValueType<CoerceT, ValueT> = [ValueT] extends [never] ? never : [CoerceT] extends [undefined] ? ValueT : CoerceT; // Modify PresetT to take into account coerce function.
|
|
121
|
+
type CoercePresetType<CoerceT, PresetT> = [PresetT] extends [never] ? never : [CoerceT] extends [undefined] ? PresetT : undefined extends PresetT ? undefined : CoerceT;
|
|
122
|
+
type BuildOptionProperty<Name extends string, FullValueT, AlwaysDefined extends boolean> = AlwaysDefined extends true ? { [K in Name]: FullValueT } : { [K in Name]?: FullValueT };
|
|
123
|
+
type InferOptionsCombine<Options, Name extends string, FullValueT, AlwaysDefined extends boolean> = Resolve<CombineOptions<Options, BuildOptionProperty<Name, FullValueT, AlwaysDefined>>>; // Combine the possible types
|
|
124
|
+
type InferOptionsNegateCombo<Options, Flag extends string, Name extends string, ValueT, PresetT, DefaultT, AlwaysDefined extends boolean> = Flag extends `--no-${string}` ? Name extends keyof Options ? InferOptionsCombine<Options, Name, PresetT, true> // combo does not set default, leave that to positive option
|
|
125
|
+
: InferOptionsCombine<Options, Name, PresetT | DefaultT, true> // lone negated option sets default
|
|
126
|
+
: InferOptionsCombine<Options, Name, ValueT | PresetT | DefaultT, AlwaysDefined>; // Recalc values taking into account negated option.
|
|
127
|
+
// Fill in appropriate PresetT value if undefined.
|
|
128
|
+
type InferOptionTypes<Options, Flag extends string, Value extends string, ValueT, PresetT, DefaultT, CoerceT, Mandatory extends boolean, ChoicesT> = InferOptionsNegateCombo<Options, Flag, ConvertFlagToName<Flag>, CoerceValueType<CoerceT, [ChoicesT] extends [undefined] ? InferVariadic<Value, ValueT> : InferVariadic<Value, ChoicesT>>, NegatePresetType<Flag, CoercePresetType<CoerceT, PresetT>>, NegateDefaultType<Flag, DefaultT>, IsAlwaysDefined<DefaultT, Mandatory>>;
|
|
129
|
+
type InferOptionsFlag<Options, Flags extends string, Value extends string, ValueT, PresetT, DefaultT, CoerceT, Mandatory extends boolean, ChoicesT> = InferOptionTypes<Options, FlagsToFlag<Trim<Flags>>, Trim<Value>, ValueT, PresetT, DefaultT, CoerceT, Mandatory, ChoicesT>; // Split up Usage into Flags and Value
|
|
130
|
+
type InferOptions<Options, Usage extends string, DefaultT, CoerceT, Mandatory extends boolean, PresetT = undefined, ChoicesT = undefined> = Usage extends `${infer Flags} <${infer Value}>` ? InferOptionsFlag<Options, Flags, Value, string, never, DefaultT, CoerceT, Mandatory, ChoicesT> : Usage extends `${infer Flags} [${infer Value}]` ? InferOptionsFlag<Options, Flags, Value, string, PresetT, DefaultT, CoerceT, Mandatory, ChoicesT> : InferOptionsFlag<Options, Usage, '', never, PresetT, DefaultT, CoerceT, Mandatory, ChoicesT>;
|
|
131
|
+
type CommandUnknownOpts = Command<unknown[], OptionValues, OptionValues>;
|
|
132
|
+
// ----- full copy of normal commander typings from here down, with extra type inference -----
|
|
133
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
134
|
+
declare class CommanderError extends Error {
|
|
135
|
+
code: string;
|
|
136
|
+
exitCode: number;
|
|
137
|
+
message: string;
|
|
138
|
+
nestedError?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Constructs the CommanderError class
|
|
141
|
+
* @param exitCode - suggested exit code which could be used with process.exit
|
|
142
|
+
* @param code - an id string representing the error
|
|
143
|
+
* @param message - human-readable description of the error
|
|
144
|
+
* @constructor
|
|
145
|
+
*/
|
|
146
|
+
constructor(exitCode: number, code: string, message: string);
|
|
147
|
+
}
|
|
148
|
+
// deprecated old name
|
|
149
|
+
interface ErrorOptions {
|
|
150
|
+
// optional parameter for error()
|
|
151
|
+
/** an id string representing the error */
|
|
152
|
+
code?: string;
|
|
153
|
+
/** suggested exit code which could be used with process.exit */
|
|
154
|
+
exitCode?: number;
|
|
155
|
+
}
|
|
156
|
+
declare class Argument<Usage extends string = '', DefaultT = undefined, CoerceT = undefined, ArgRequired extends boolean | undefined = undefined, ChoicesT = undefined> {
|
|
157
|
+
description: string;
|
|
158
|
+
required: boolean;
|
|
159
|
+
variadic: boolean;
|
|
160
|
+
defaultValue?: any;
|
|
161
|
+
defaultValueDescription?: string;
|
|
162
|
+
parseArg?: <T>(value: string, previous: T) => T;
|
|
163
|
+
argChoices?: string[];
|
|
164
|
+
/**
|
|
165
|
+
* Initialize a new command argument with the given name and description.
|
|
166
|
+
* The default is that the argument is required, and you can explicitly
|
|
167
|
+
* indicate this with <> around the name. Put [] around the name for an optional argument.
|
|
168
|
+
*/
|
|
169
|
+
constructor(arg: Usage, description?: string);
|
|
170
|
+
/**
|
|
171
|
+
* Return argument name.
|
|
172
|
+
*/
|
|
173
|
+
name(): string;
|
|
174
|
+
/**
|
|
175
|
+
* Set the default value, and optionally supply the description to be displayed in the help.
|
|
176
|
+
*/
|
|
177
|
+
default<const T>(value: T, description?: string): Argument<Usage, T, CoerceT, ArgRequired, ChoicesT>;
|
|
178
|
+
/**
|
|
179
|
+
* Set the custom handler for processing CLI command arguments into argument values.
|
|
180
|
+
*/
|
|
181
|
+
argParser<T>(fn: (value: string, previous: T) => T): Argument<Usage, DefaultT, T, ArgRequired, undefined>; // setting ChoicesT to undefined because argParser overwrites choices
|
|
182
|
+
/**
|
|
183
|
+
* Only allow argument value to be one of choices.
|
|
184
|
+
*/
|
|
185
|
+
choices<const T extends readonly string[]>(values: T): Argument<Usage, DefaultT, undefined, ArgRequired, T[number]>; // setting CoerceT to undefined because choices overrides argParser
|
|
186
|
+
/**
|
|
187
|
+
* Make argument required.
|
|
188
|
+
*/
|
|
189
|
+
argRequired(): Argument<Usage, DefaultT, CoerceT, true, ChoicesT>;
|
|
190
|
+
/**
|
|
191
|
+
* Make argument optional.
|
|
192
|
+
*/
|
|
193
|
+
argOptional(): Argument<Usage, DefaultT, CoerceT, false, ChoicesT>;
|
|
194
|
+
}
|
|
195
|
+
declare class Option<Usage extends string = '', PresetT = undefined, DefaultT = undefined, CoerceT = undefined, Mandatory extends boolean = false, ChoicesT = undefined> {
|
|
196
|
+
flags: string;
|
|
197
|
+
description: string;
|
|
198
|
+
required: boolean; // A value must be supplied when the option is specified.
|
|
199
|
+
optional: boolean; // A value is optional when the option is specified.
|
|
200
|
+
variadic: boolean;
|
|
201
|
+
mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line.
|
|
202
|
+
short?: string;
|
|
203
|
+
long?: string;
|
|
204
|
+
negate: boolean;
|
|
205
|
+
defaultValue?: any;
|
|
206
|
+
defaultValueDescription?: string;
|
|
207
|
+
presetArg?: unknown;
|
|
208
|
+
envVar?: string;
|
|
209
|
+
parseArg?: <T>(value: string, previous: T) => T;
|
|
210
|
+
hidden: boolean;
|
|
211
|
+
argChoices?: string[];
|
|
212
|
+
helpGroupHeading?: string;
|
|
213
|
+
constructor(flags: Usage, description?: string);
|
|
214
|
+
/**
|
|
215
|
+
* Set the default value, and optionally supply the description to be displayed in the help.
|
|
216
|
+
*/
|
|
217
|
+
default<const T>(value: T, description?: string): Option<Usage, PresetT, T, CoerceT, Mandatory, ChoicesT>;
|
|
218
|
+
/**
|
|
219
|
+
* Preset to use when option used without option-argument, especially optional but also boolean and negated.
|
|
220
|
+
* The custom processing (parseArg) is called.
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```ts
|
|
224
|
+
* new Option('--color').default('GREYSCALE').preset('RGB');
|
|
225
|
+
* new Option('--donate [amount]').preset('20').argParser(parseFloat);
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
preset<const T>(arg: T): Option<Usage, T, DefaultT, CoerceT, Mandatory, ChoicesT>;
|
|
229
|
+
/**
|
|
230
|
+
* Add option name(s) that conflict with this option.
|
|
231
|
+
* An error will be displayed if conflicting options are found during parsing.
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```ts
|
|
235
|
+
* new Option('--rgb').conflicts('cmyk');
|
|
236
|
+
* new Option('--js').conflicts(['ts', 'jsx']);
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
conflicts(names: string | string[]): this;
|
|
240
|
+
/**
|
|
241
|
+
* Specify implied option values for when this option is set and the implied options are not.
|
|
242
|
+
*
|
|
243
|
+
* The custom processing (parseArg) is not called on the implied values.
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* program
|
|
247
|
+
* .addOption(new Option('--log', 'write logging information to file'))
|
|
248
|
+
* .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));
|
|
249
|
+
*/
|
|
250
|
+
implies(optionValues: OptionValues): this;
|
|
251
|
+
/**
|
|
252
|
+
* Set environment variable to check for option value.
|
|
253
|
+
*
|
|
254
|
+
* An environment variables is only used if when processed the current option value is
|
|
255
|
+
* undefined, or the source of the current value is 'default' or 'config' or 'env'.
|
|
256
|
+
*/
|
|
257
|
+
env(name: string): this;
|
|
258
|
+
/**
|
|
259
|
+
* Set the custom handler for processing CLI option arguments into option values.
|
|
260
|
+
*/
|
|
261
|
+
argParser<T>(fn: (value: string, previous: T) => T): Option<Usage, PresetT, DefaultT, T, Mandatory, undefined>; // setting ChoicesT to undefined because argParser overrides choices
|
|
262
|
+
/**
|
|
263
|
+
* Whether the option is mandatory and must have a value after parsing.
|
|
264
|
+
*/
|
|
265
|
+
makeOptionMandatory<M extends boolean = true>(mandatory?: M): Option<Usage, PresetT, DefaultT, CoerceT, M, ChoicesT>;
|
|
266
|
+
/**
|
|
267
|
+
* Hide option in help.
|
|
268
|
+
*/
|
|
269
|
+
hideHelp(hide?: boolean): this;
|
|
270
|
+
/**
|
|
271
|
+
* Only allow option value to be one of choices.
|
|
272
|
+
*/
|
|
273
|
+
choices<const T extends readonly string[]>(values: T): Option<Usage, PresetT, DefaultT, undefined, Mandatory, T[number]>; // setting CoerceT to undefined becuase choices overrides argParser
|
|
274
|
+
/**
|
|
275
|
+
* Return option name.
|
|
276
|
+
*/
|
|
277
|
+
name(): string;
|
|
278
|
+
/**
|
|
279
|
+
* Return option name, in a camelcase format that can be used
|
|
280
|
+
* as an object attribute key.
|
|
281
|
+
*/
|
|
282
|
+
attributeName(): string;
|
|
283
|
+
/**
|
|
284
|
+
* Set the help group heading.
|
|
285
|
+
*/
|
|
286
|
+
helpGroup(heading: string): this;
|
|
287
|
+
/**
|
|
288
|
+
* Return whether a boolean option.
|
|
289
|
+
*
|
|
290
|
+
* Options are one of boolean, negated, required argument, or optional argument.
|
|
291
|
+
*/
|
|
292
|
+
isBoolean(): boolean;
|
|
293
|
+
}
|
|
294
|
+
declare class Help {
|
|
295
|
+
/** output helpWidth, long lines are wrapped to fit */
|
|
296
|
+
helpWidth?: number;
|
|
297
|
+
minWidthToWrap: number;
|
|
298
|
+
sortSubcommands: boolean;
|
|
299
|
+
sortOptions: boolean;
|
|
300
|
+
showGlobalOptions: boolean;
|
|
301
|
+
constructor();
|
|
302
|
+
/*
|
|
303
|
+
* prepareContext is called by Commander after applying overrides from `Command.configureHelp()`
|
|
304
|
+
* and just before calling `formatHelp()`.
|
|
305
|
+
*
|
|
306
|
+
* Commander just uses the helpWidth and the others are provided for subclasses.
|
|
307
|
+
*/
|
|
308
|
+
prepareContext(contextOptions: {
|
|
309
|
+
error?: boolean;
|
|
310
|
+
helpWidth?: number;
|
|
311
|
+
outputHasColors?: boolean;
|
|
312
|
+
}): void;
|
|
313
|
+
/** Get the command term to show in the list of subcommands. */
|
|
314
|
+
subcommandTerm(cmd: CommandUnknownOpts): string;
|
|
315
|
+
/** Get the command summary to show in the list of subcommands. */
|
|
316
|
+
subcommandDescription(cmd: CommandUnknownOpts): string;
|
|
317
|
+
/** Get the option term to show in the list of options. */
|
|
318
|
+
optionTerm(option: Option): string;
|
|
319
|
+
/** Get the option description to show in the list of options. */
|
|
320
|
+
optionDescription(option: Option): string;
|
|
321
|
+
/** Get the argument term to show in the list of arguments. */
|
|
322
|
+
argumentTerm(argument: Argument): string;
|
|
323
|
+
/** Get the argument description to show in the list of arguments. */
|
|
324
|
+
argumentDescription(argument: Argument): string;
|
|
325
|
+
/** Get the command usage to be displayed at the top of the built-in help. */
|
|
326
|
+
commandUsage(cmd: CommandUnknownOpts): string;
|
|
327
|
+
/** Get the description for the command. */
|
|
328
|
+
commandDescription(cmd: CommandUnknownOpts): string;
|
|
329
|
+
/** Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. */
|
|
330
|
+
visibleCommands(cmd: CommandUnknownOpts): CommandUnknownOpts[];
|
|
331
|
+
/** Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. */
|
|
332
|
+
visibleOptions(cmd: CommandUnknownOpts): Option[];
|
|
333
|
+
/** Get an array of the visible global options. (Not including help.) */
|
|
334
|
+
visibleGlobalOptions(cmd: CommandUnknownOpts): Option[];
|
|
335
|
+
/** Get an array of the arguments which have descriptions. */
|
|
336
|
+
visibleArguments(cmd: CommandUnknownOpts): Argument[];
|
|
337
|
+
/** Get the longest command term length. */
|
|
338
|
+
longestSubcommandTermLength(cmd: CommandUnknownOpts, helper: Help): number;
|
|
339
|
+
/** Get the longest option term length. */
|
|
340
|
+
longestOptionTermLength(cmd: CommandUnknownOpts, helper: Help): number;
|
|
341
|
+
/** Get the longest global option term length. */
|
|
342
|
+
longestGlobalOptionTermLength(cmd: CommandUnknownOpts, helper: Help): number;
|
|
343
|
+
/** Get the longest argument term length. */
|
|
344
|
+
longestArgumentTermLength(cmd: CommandUnknownOpts, helper: Help): number;
|
|
345
|
+
/** Return display width of string, ignoring ANSI escape sequences. Used in padding and wrapping calculations. */
|
|
346
|
+
displayWidth(str: string): number;
|
|
347
|
+
/** Style the titles. Called with 'Usage:', 'Options:', etc. */
|
|
348
|
+
styleTitle(title: string): string;
|
|
349
|
+
/** Usage: <str> */
|
|
350
|
+
styleUsage(str: string): string;
|
|
351
|
+
/** Style for command name in usage string. */
|
|
352
|
+
styleCommandText(str: string): string;
|
|
353
|
+
styleCommandDescription(str: string): string;
|
|
354
|
+
styleOptionDescription(str: string): string;
|
|
355
|
+
styleSubcommandDescription(str: string): string;
|
|
356
|
+
styleArgumentDescription(str: string): string;
|
|
357
|
+
/** Base style used by descriptions. */
|
|
358
|
+
styleDescriptionText(str: string): string;
|
|
359
|
+
styleOptionTerm(str: string): string;
|
|
360
|
+
styleSubcommandTerm(str: string): string;
|
|
361
|
+
styleArgumentTerm(str: string): string;
|
|
362
|
+
/** Base style used in terms and usage for options. */
|
|
363
|
+
styleOptionText(str: string): string;
|
|
364
|
+
/** Base style used in terms and usage for subcommands. */
|
|
365
|
+
styleSubcommandText(str: string): string;
|
|
366
|
+
/** Base style used in terms and usage for arguments. */
|
|
367
|
+
styleArgumentText(str: string): string;
|
|
368
|
+
/** Calculate the pad width from the maximum term length. */
|
|
369
|
+
padWidth(cmd: CommandUnknownOpts, helper: Help): number;
|
|
370
|
+
/**
|
|
371
|
+
* Wrap a string at whitespace, preserving existing line breaks.
|
|
372
|
+
* Wrapping is skipped if the width is less than `minWidthToWrap`.
|
|
373
|
+
*/
|
|
374
|
+
boxWrap(str: string, width: number): string;
|
|
375
|
+
/** Detect manually wrapped and indented strings by checking for line break followed by whitespace. */
|
|
376
|
+
preformatted(str: string): boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Format the "item", which consists of a term and description. Pad the term and wrap the description, indenting the following lines.
|
|
379
|
+
*
|
|
380
|
+
* So "TTT", 5, "DDD DDDD DD DDD" might be formatted for this.helpWidth=17 like so:
|
|
381
|
+
* TTT DDD DDDD
|
|
382
|
+
* DD DDD
|
|
383
|
+
*/
|
|
384
|
+
formatItem(term: string, termWidth: number, description: string, helper: Help): string;
|
|
385
|
+
/**
|
|
386
|
+
* Format a list of items, given a heading and an array of formatted items.
|
|
387
|
+
*/
|
|
388
|
+
formatItemList(heading: string, items: string[], helper: Help): string[];
|
|
389
|
+
/**
|
|
390
|
+
* Group items by their help group heading.
|
|
391
|
+
*/
|
|
392
|
+
groupItems<T extends Command | Option>(unsortedItems: T[], visibleItems: T[], getGroup: (item: T) => string): Map<string, T[]>;
|
|
393
|
+
/** Generate the built-in help text. */
|
|
394
|
+
formatHelp(cmd: CommandUnknownOpts, helper: Help): string;
|
|
395
|
+
}
|
|
396
|
+
type HelpConfiguration = Partial<Help>;
|
|
397
|
+
interface ParseOptions {
|
|
398
|
+
from: 'node' | 'electron' | 'user';
|
|
399
|
+
}
|
|
400
|
+
interface HelpContext {
|
|
401
|
+
// optional parameter for .help() and .outputHelp()
|
|
402
|
+
error: boolean;
|
|
403
|
+
}
|
|
404
|
+
interface AddHelpTextContext {
|
|
405
|
+
// passed to text function used with .addHelpText()
|
|
406
|
+
error: boolean;
|
|
407
|
+
command: Command;
|
|
408
|
+
}
|
|
409
|
+
interface OutputConfiguration {
|
|
410
|
+
writeOut?(str: string): void;
|
|
411
|
+
writeErr?(str: string): void;
|
|
412
|
+
outputError?(str: string, write: (str: string) => void): void;
|
|
413
|
+
getOutHelpWidth?(): number;
|
|
414
|
+
getErrHelpWidth?(): number;
|
|
415
|
+
getOutHasColors?(): boolean;
|
|
416
|
+
getErrHasColors?(): boolean;
|
|
417
|
+
stripColor?(str: string): string;
|
|
418
|
+
}
|
|
419
|
+
type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll';
|
|
420
|
+
type HookEvent = 'preSubcommand' | 'preAction' | 'postAction';
|
|
421
|
+
// The source is a string so author can define their own too.
|
|
422
|
+
type OptionValueSource = LiteralUnion<'default' | 'config' | 'env' | 'cli' | 'implied', string> | undefined;
|
|
423
|
+
type OptionValues = Record<string, unknown>;
|
|
424
|
+
declare class Command<Args extends any[] = [], Opts extends OptionValues = {}, GlobalOpts extends OptionValues = {}> {
|
|
425
|
+
args: string[];
|
|
426
|
+
processedArgs: Args;
|
|
427
|
+
readonly commands: readonly CommandUnknownOpts[];
|
|
428
|
+
readonly options: readonly Option[];
|
|
429
|
+
readonly registeredArguments: readonly Argument[];
|
|
430
|
+
parent: CommandUnknownOpts | null;
|
|
431
|
+
constructor(name?: string);
|
|
432
|
+
/**
|
|
433
|
+
* Set the program version to `str`.
|
|
434
|
+
*
|
|
435
|
+
* This method auto-registers the "-V, --version" flag
|
|
436
|
+
* which will print the version number when passed.
|
|
437
|
+
*
|
|
438
|
+
* You can optionally supply the flags and description to override the defaults.
|
|
439
|
+
*/
|
|
440
|
+
version(str: string, flags?: string, description?: string): this;
|
|
441
|
+
/**
|
|
442
|
+
* Get the program version.
|
|
443
|
+
*/
|
|
444
|
+
version(): string | undefined;
|
|
445
|
+
/**
|
|
446
|
+
* Define a command, implemented using an action handler.
|
|
447
|
+
*
|
|
448
|
+
* @remarks
|
|
449
|
+
* The command description is supplied using `.description`, not as a parameter to `.command`.
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```ts
|
|
453
|
+
* program
|
|
454
|
+
* .command('clone <source> [destination]')
|
|
455
|
+
* .description('clone a repository into a newly created directory')
|
|
456
|
+
* .action((source, destination) => {
|
|
457
|
+
* console.log('clone command called');
|
|
458
|
+
* });
|
|
459
|
+
* ```
|
|
460
|
+
*
|
|
461
|
+
* @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
|
|
462
|
+
* @param opts - configuration options
|
|
463
|
+
* @returns new command
|
|
464
|
+
*/
|
|
465
|
+
command<Usage extends string>(nameAndArgs: Usage, opts?: CommandOptions): Command<[...InferCommandArguments<Usage>], {}, Opts & GlobalOpts>;
|
|
466
|
+
/**
|
|
467
|
+
* Define a command, implemented in a separate executable file.
|
|
468
|
+
*
|
|
469
|
+
* @remarks
|
|
470
|
+
* The command description is supplied as the second parameter to `.command`.
|
|
471
|
+
*
|
|
472
|
+
* @example
|
|
473
|
+
* ```ts
|
|
474
|
+
* program
|
|
475
|
+
* .command('start <service>', 'start named service')
|
|
476
|
+
* .command('stop [service]', 'stop named service, or all if no name supplied');
|
|
477
|
+
* ```
|
|
478
|
+
*
|
|
479
|
+
* @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
|
|
480
|
+
* @param description - description of executable command
|
|
481
|
+
* @param opts - configuration options
|
|
482
|
+
* @returns `this` command for chaining
|
|
483
|
+
*/
|
|
484
|
+
command(nameAndArgs: string, description: string, opts?: ExecutableCommandOptions): this;
|
|
485
|
+
/**
|
|
486
|
+
* Factory routine to create a new unattached command.
|
|
487
|
+
*
|
|
488
|
+
* See .command() for creating an attached subcommand, which uses this routine to
|
|
489
|
+
* create the command. You can override createCommand to customise subcommands.
|
|
490
|
+
*/
|
|
491
|
+
createCommand(name?: string): Command;
|
|
492
|
+
/**
|
|
493
|
+
* Add a prepared subcommand.
|
|
494
|
+
*
|
|
495
|
+
* See .command() for creating an attached subcommand which inherits settings from its parent.
|
|
496
|
+
*
|
|
497
|
+
* @returns `this` command for chaining
|
|
498
|
+
*/
|
|
499
|
+
addCommand(cmd: CommandUnknownOpts, opts?: CommandOptions): this;
|
|
500
|
+
/**
|
|
501
|
+
* Factory routine to create a new unattached argument.
|
|
502
|
+
*
|
|
503
|
+
* See .argument() for creating an attached argument, which uses this routine to
|
|
504
|
+
* create the argument. You can override createArgument to return a custom argument.
|
|
505
|
+
*/
|
|
506
|
+
createArgument<Usage extends string>(name: Usage, description?: string): Argument<Usage>;
|
|
507
|
+
/**
|
|
508
|
+
* Define argument syntax for command.
|
|
509
|
+
*
|
|
510
|
+
* The default is that the argument is required, and you can explicitly
|
|
511
|
+
* indicate this with <> around the name. Put [] around the name for an optional argument.
|
|
512
|
+
*
|
|
513
|
+
* @example
|
|
514
|
+
* ```
|
|
515
|
+
* program.argument('<input-file>');
|
|
516
|
+
* program.argument('[output-file]');
|
|
517
|
+
* ```
|
|
518
|
+
*
|
|
519
|
+
* @returns `this` command for chaining
|
|
520
|
+
*/
|
|
521
|
+
argument<S extends string, T>(flags: S, description: string, parseArg: (value: string, previous: T) => T): Command<[...Args, InferArgument<S, undefined, T>], Opts, GlobalOpts>;
|
|
522
|
+
argument<S extends string, T>(flags: S, description: string, parseArg: (value: string, previous: T) => T, defaultValue: T): Command<[...Args, InferArgument<S, T, T>], Opts, GlobalOpts>;
|
|
523
|
+
argument<S extends string>(usage: S, description?: string): Command<[...Args, InferArgument<S, undefined>], Opts, GlobalOpts>;
|
|
524
|
+
argument<S extends string, DefaultT>(usage: S, description: string, defaultValue: DefaultT): Command<[...Args, InferArgument<S, DefaultT>], Opts, GlobalOpts>;
|
|
525
|
+
/**
|
|
526
|
+
* Define argument syntax for command, adding a prepared argument.
|
|
527
|
+
*
|
|
528
|
+
* @returns `this` command for chaining
|
|
529
|
+
*/
|
|
530
|
+
addArgument<Usage extends string, DefaultT, CoerceT, ArgRequired extends boolean | undefined, ChoicesT>(arg: Argument<Usage, DefaultT, CoerceT, ArgRequired, ChoicesT>): Command<[...Args, InferArgument<Usage, DefaultT, CoerceT, ArgRequired, ChoicesT>], Opts, GlobalOpts>;
|
|
531
|
+
/**
|
|
532
|
+
* Define argument syntax for command, adding multiple at once (without descriptions).
|
|
533
|
+
*
|
|
534
|
+
* See also .argument().
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* ```
|
|
538
|
+
* program.arguments('<cmd> [env]');
|
|
539
|
+
* ```
|
|
540
|
+
*
|
|
541
|
+
* @returns `this` command for chaining
|
|
542
|
+
*/
|
|
543
|
+
arguments<Names extends string>(args: Names): Command<[...Args, ...InferArguments<Names>], Opts, GlobalOpts>;
|
|
544
|
+
/**
|
|
545
|
+
* Customise or override default help command. By default a help command is automatically added if your command has subcommands.
|
|
546
|
+
*
|
|
547
|
+
* @example
|
|
548
|
+
* ```ts
|
|
549
|
+
* program.helpCommand('help [cmd]');
|
|
550
|
+
* program.helpCommand('help [cmd]', 'show help');
|
|
551
|
+
* program.helpCommand(false); // suppress default help command
|
|
552
|
+
* program.helpCommand(true); // add help command even if no subcommands
|
|
553
|
+
* ```
|
|
554
|
+
*/
|
|
555
|
+
helpCommand(nameAndArgs: string, description?: string): this;
|
|
556
|
+
helpCommand(enable: boolean): this;
|
|
557
|
+
/**
|
|
558
|
+
* Add prepared custom help command.
|
|
559
|
+
*/
|
|
560
|
+
addHelpCommand(cmd: Command): this;
|
|
561
|
+
/** @deprecated since v12, instead use helpCommand */
|
|
562
|
+
addHelpCommand(nameAndArgs: string, description?: string): this;
|
|
563
|
+
/** @deprecated since v12, instead use helpCommand */
|
|
564
|
+
addHelpCommand(enable?: boolean): this;
|
|
565
|
+
/**
|
|
566
|
+
* Add hook for life cycle event.
|
|
567
|
+
*/
|
|
568
|
+
hook(event: HookEvent, listener: (thisCommand: this, actionCommand: CommandUnknownOpts) => void | Promise<void>): this;
|
|
569
|
+
/**
|
|
570
|
+
* Register callback to use as replacement for calling process.exit.
|
|
571
|
+
*/
|
|
572
|
+
exitOverride(callback?: (err: CommanderError) => never | void): this;
|
|
573
|
+
/**
|
|
574
|
+
* Display error message and exit (or call exitOverride).
|
|
575
|
+
*/
|
|
576
|
+
error(message: string, errorOptions?: ErrorOptions): never;
|
|
577
|
+
/**
|
|
578
|
+
* You can customise the help with a subclass of Help by overriding createHelp,
|
|
579
|
+
* or by overriding Help properties using configureHelp().
|
|
580
|
+
*/
|
|
581
|
+
createHelp(): Help;
|
|
582
|
+
/**
|
|
583
|
+
* You can customise the help by overriding Help properties using configureHelp(),
|
|
584
|
+
* or with a subclass of Help by overriding createHelp().
|
|
585
|
+
*/
|
|
586
|
+
configureHelp(configuration: HelpConfiguration): this;
|
|
587
|
+
/** Get configuration */
|
|
588
|
+
configureHelp(): HelpConfiguration;
|
|
589
|
+
/**
|
|
590
|
+
* The default output goes to stdout and stderr. You can customise this for special
|
|
591
|
+
* applications. You can also customise the display of errors by overriding outputError.
|
|
592
|
+
*
|
|
593
|
+
* The configuration properties are all functions:
|
|
594
|
+
* ```
|
|
595
|
+
* // functions to change where being written, stdout and stderr
|
|
596
|
+
* writeOut(str)
|
|
597
|
+
* writeErr(str)
|
|
598
|
+
* // matching functions to specify width for wrapping help
|
|
599
|
+
* getOutHelpWidth()
|
|
600
|
+
* getErrHelpWidth()
|
|
601
|
+
* // functions based on what is being written out
|
|
602
|
+
* outputError(str, write) // used for displaying errors, and not used for displaying help
|
|
603
|
+
* ```
|
|
604
|
+
*/
|
|
605
|
+
configureOutput(configuration: OutputConfiguration): this;
|
|
606
|
+
/** Get configuration */
|
|
607
|
+
configureOutput(): OutputConfiguration;
|
|
608
|
+
/**
|
|
609
|
+
* Copy settings that are useful to have in common across root command and subcommands.
|
|
610
|
+
*
|
|
611
|
+
* (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)
|
|
612
|
+
*/
|
|
613
|
+
copyInheritedSettings(sourceCommand: CommandUnknownOpts): this;
|
|
614
|
+
/**
|
|
615
|
+
* Display the help or a custom message after an error occurs.
|
|
616
|
+
*/
|
|
617
|
+
showHelpAfterError(displayHelp?: boolean | string): this;
|
|
618
|
+
/**
|
|
619
|
+
* Display suggestion of similar commands for unknown commands, or options for unknown options.
|
|
620
|
+
*/
|
|
621
|
+
showSuggestionAfterError(displaySuggestion?: boolean): this;
|
|
622
|
+
/**
|
|
623
|
+
* Register callback `fn` for the command.
|
|
624
|
+
*
|
|
625
|
+
* @example
|
|
626
|
+
* ```
|
|
627
|
+
* program
|
|
628
|
+
* .command('serve')
|
|
629
|
+
* .description('start service')
|
|
630
|
+
* .action(function() {
|
|
631
|
+
* // do work here
|
|
632
|
+
* });
|
|
633
|
+
* ```
|
|
634
|
+
*
|
|
635
|
+
* @returns `this` command for chaining
|
|
636
|
+
*/
|
|
637
|
+
action(fn: (this: this, ...args: [...Args, Opts, this]) => void | Promise<void>): this;
|
|
638
|
+
/**
|
|
639
|
+
* Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.
|
|
640
|
+
*
|
|
641
|
+
* The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required
|
|
642
|
+
* option-argument is indicated by `<>` and an optional option-argument by `[]`.
|
|
643
|
+
*
|
|
644
|
+
* See the README for more details, and see also addOption() and requiredOption().
|
|
645
|
+
*
|
|
646
|
+
* @example
|
|
647
|
+
*
|
|
648
|
+
* ```js
|
|
649
|
+
* program
|
|
650
|
+
* .option('-p, --pepper', 'add pepper')
|
|
651
|
+
* .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument
|
|
652
|
+
* .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default
|
|
653
|
+
* .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function
|
|
654
|
+
* ```
|
|
655
|
+
*
|
|
656
|
+
* @returns `this` command for chaining
|
|
657
|
+
*/
|
|
658
|
+
option<S extends string>(usage: S, description?: string): Command<Args, InferOptions<Opts, S, undefined, undefined, false>, GlobalOpts>;
|
|
659
|
+
option<S extends string, DefaultT extends string | boolean | string[] | []>(usage: S, description?: string, defaultValue?: DefaultT): Command<Args, InferOptions<Opts, S, DefaultT, undefined, false>, GlobalOpts>;
|
|
660
|
+
option<S extends string, T>(usage: S, description: string, parseArg: (value: string, previous: T) => T): Command<Args, InferOptions<Opts, S, undefined, T, false>, GlobalOpts>;
|
|
661
|
+
option<S extends string, T>(usage: S, description: string, parseArg: (value: string, previous: T) => T, defaultValue?: T): Command<Args, InferOptions<Opts, S, T, T, false>, GlobalOpts>;
|
|
662
|
+
/**
|
|
663
|
+
* Define a required option, which must have a value after parsing. This usually means
|
|
664
|
+
* the option must be specified on the command line. (Otherwise the same as .option().)
|
|
665
|
+
*
|
|
666
|
+
* The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.
|
|
667
|
+
*/
|
|
668
|
+
requiredOption<S extends string>(usage: S, description?: string): Command<Args, InferOptions<Opts, S, undefined, undefined, true>, GlobalOpts>;
|
|
669
|
+
requiredOption<S extends string, DefaultT extends string | boolean | string[]>(usage: S, description?: string, defaultValue?: DefaultT): Command<Args, InferOptions<Opts, S, DefaultT, undefined, true>, GlobalOpts>;
|
|
670
|
+
requiredOption<S extends string, T>(usage: S, description: string, parseArg: (value: string, previous: T) => T): Command<Args, InferOptions<Opts, S, undefined, T, true>, GlobalOpts>;
|
|
671
|
+
requiredOption<S extends string, T, D extends T>(usage: S, description: string, parseArg: (value: string, previous: T) => T, defaultValue?: D): Command<Args, InferOptions<Opts, S, D, T, true>, GlobalOpts>;
|
|
672
|
+
/**
|
|
673
|
+
* Factory routine to create a new unattached option.
|
|
674
|
+
*
|
|
675
|
+
* See .option() for creating an attached option, which uses this routine to
|
|
676
|
+
* create the option. You can override createOption to return a custom option.
|
|
677
|
+
*/
|
|
678
|
+
createOption<Usage extends string>(flags: Usage, description?: string): Option<Usage>;
|
|
679
|
+
/**
|
|
680
|
+
* Add a prepared Option.
|
|
681
|
+
*
|
|
682
|
+
* See .option() and .requiredOption() for creating and attaching an option in a single call.
|
|
683
|
+
*/
|
|
684
|
+
addOption<Usage extends string, PresetT, DefaultT, CoerceT, Mandatory extends boolean, ChoicesT>(option: Option<Usage, PresetT, DefaultT, CoerceT, Mandatory, ChoicesT>): Command<Args, InferOptions<Opts, Usage, DefaultT, CoerceT, Mandatory, PresetT, ChoicesT>, GlobalOpts>;
|
|
685
|
+
/**
|
|
686
|
+
* Whether to store option values as properties on command object,
|
|
687
|
+
* or store separately (specify false). In both cases the option values can be accessed using .opts().
|
|
688
|
+
*
|
|
689
|
+
* @returns `this` command for chaining
|
|
690
|
+
*/
|
|
691
|
+
storeOptionsAsProperties<T extends OptionValues>(): this & T;
|
|
692
|
+
storeOptionsAsProperties<T extends OptionValues>(storeAsProperties: true): this & T;
|
|
693
|
+
storeOptionsAsProperties(storeAsProperties?: boolean): this;
|
|
694
|
+
/**
|
|
695
|
+
* Retrieve option value.
|
|
696
|
+
*/
|
|
697
|
+
getOptionValue<K extends keyof Opts>(key: K): Opts[K];
|
|
698
|
+
getOptionValue(key: string): unknown;
|
|
699
|
+
/**
|
|
700
|
+
* Store option value.
|
|
701
|
+
*/
|
|
702
|
+
setOptionValue<K extends keyof Opts>(key: K, value: unknown): this;
|
|
703
|
+
setOptionValue(key: string, value: unknown): this;
|
|
704
|
+
/**
|
|
705
|
+
* Store option value and where the value came from.
|
|
706
|
+
*/
|
|
707
|
+
setOptionValueWithSource<K extends keyof Opts>(key: K, value: unknown, source: OptionValueSource): this;
|
|
708
|
+
setOptionValueWithSource(key: string, value: unknown, source: OptionValueSource): this;
|
|
709
|
+
/**
|
|
710
|
+
* Get source of option value.
|
|
711
|
+
*/
|
|
712
|
+
getOptionValueSource<K extends keyof Opts>(key: K): OptionValueSource | undefined;
|
|
713
|
+
getOptionValueSource(key: string): OptionValueSource | undefined;
|
|
714
|
+
/**
|
|
715
|
+
* Get source of option value. See also .optsWithGlobals().
|
|
716
|
+
*/
|
|
717
|
+
getOptionValueSourceWithGlobals<K extends keyof (Opts & GlobalOpts)>(key: K): OptionValueSource | undefined;
|
|
718
|
+
getOptionValueSourceWithGlobals(key: string): OptionValueSource | undefined;
|
|
719
|
+
/**
|
|
720
|
+
* Alter parsing of short flags with optional values.
|
|
721
|
+
*
|
|
722
|
+
* @example
|
|
723
|
+
* ```
|
|
724
|
+
* // for `.option('-f,--flag [value]'):
|
|
725
|
+
* .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour
|
|
726
|
+
* .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`
|
|
727
|
+
* ```
|
|
728
|
+
*
|
|
729
|
+
* @returns `this` command for chaining
|
|
730
|
+
*/
|
|
731
|
+
combineFlagAndOptionalValue(combine?: boolean): this;
|
|
732
|
+
/**
|
|
733
|
+
* Allow unknown options on the command line.
|
|
734
|
+
*
|
|
735
|
+
* @returns `this` command for chaining
|
|
736
|
+
*/
|
|
737
|
+
allowUnknownOption(allowUnknown?: boolean): this;
|
|
738
|
+
/**
|
|
739
|
+
* Allow excess command-arguments on the command line. Pass false to make excess arguments an error.
|
|
740
|
+
*
|
|
741
|
+
* @returns `this` command for chaining
|
|
742
|
+
*/
|
|
743
|
+
allowExcessArguments(allowExcess?: boolean): this;
|
|
744
|
+
/**
|
|
745
|
+
* Enable positional options. Positional means global options are specified before subcommands which lets
|
|
746
|
+
* subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.
|
|
747
|
+
*
|
|
748
|
+
* The default behaviour is non-positional and global options may appear anywhere on the command line.
|
|
749
|
+
*
|
|
750
|
+
* @returns `this` command for chaining
|
|
751
|
+
*/
|
|
752
|
+
enablePositionalOptions(positional?: boolean): this;
|
|
753
|
+
/**
|
|
754
|
+
* Pass through options that come after command-arguments rather than treat them as command-options,
|
|
755
|
+
* so actual command-options come before command-arguments. Turning this on for a subcommand requires
|
|
756
|
+
* positional options to have been enabled on the program (parent commands).
|
|
757
|
+
*
|
|
758
|
+
* The default behaviour is non-positional and options may appear before or after command-arguments.
|
|
759
|
+
*
|
|
760
|
+
* @returns `this` command for chaining
|
|
761
|
+
*/
|
|
762
|
+
passThroughOptions(passThrough?: boolean): this;
|
|
763
|
+
/**
|
|
764
|
+
* Parse `argv`, setting options and invoking commands when defined.
|
|
765
|
+
*
|
|
766
|
+
* The default expectation is that the arguments are from node and have the application as argv[0]
|
|
767
|
+
* and the script being run in argv[1], with user parameters after that.
|
|
768
|
+
*
|
|
769
|
+
* @example
|
|
770
|
+
* ```
|
|
771
|
+
* program.parse(process.argv);
|
|
772
|
+
* program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions
|
|
773
|
+
* program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
|
|
774
|
+
* ```
|
|
775
|
+
*
|
|
776
|
+
* @returns `this` command for chaining
|
|
777
|
+
*/
|
|
778
|
+
parse(argv?: readonly string[], options?: ParseOptions): this;
|
|
779
|
+
/**
|
|
780
|
+
* Parse `argv`, setting options and invoking commands when defined.
|
|
781
|
+
*
|
|
782
|
+
* Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.
|
|
783
|
+
*
|
|
784
|
+
* The default expectation is that the arguments are from node and have the application as argv[0]
|
|
785
|
+
* and the script being run in argv[1], with user parameters after that.
|
|
786
|
+
*
|
|
787
|
+
* @example
|
|
788
|
+
* ```
|
|
789
|
+
* program.parseAsync(process.argv);
|
|
790
|
+
* program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions
|
|
791
|
+
* program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
|
|
792
|
+
* ```
|
|
793
|
+
*
|
|
794
|
+
* @returns Promise
|
|
795
|
+
*/
|
|
796
|
+
parseAsync(argv?: readonly string[], options?: ParseOptions): Promise<this>;
|
|
797
|
+
/**
|
|
798
|
+
* Called the first time parse is called to save state and allow a restore before subsequent calls to parse.
|
|
799
|
+
* Not usually called directly, but available for subclasses to save their custom state.
|
|
800
|
+
*
|
|
801
|
+
* This is called in a lazy way. Only commands used in parsing chain will have state saved.
|
|
802
|
+
*/
|
|
803
|
+
saveStateBeforeParse(): void;
|
|
804
|
+
/**
|
|
805
|
+
* Restore state before parse for calls after the first.
|
|
806
|
+
* Not usually called directly, but available for subclasses to save their custom state.
|
|
807
|
+
*
|
|
808
|
+
* This is called in a lazy way. Only commands used in parsing chain will have state restored.
|
|
809
|
+
*/
|
|
810
|
+
restoreStateBeforeParse(): void;
|
|
811
|
+
/**
|
|
812
|
+
* Parse options from `argv` removing known options,
|
|
813
|
+
* and return argv split into operands and unknown arguments.
|
|
814
|
+
*
|
|
815
|
+
* argv => operands, unknown
|
|
816
|
+
* --known kkk op => [op], []
|
|
817
|
+
* op --known kkk => [op], []
|
|
818
|
+
* sub --unknown uuu op => [sub], [--unknown uuu op]
|
|
819
|
+
* sub -- --unknown uuu op => [sub --unknown uuu op], []
|
|
820
|
+
*/
|
|
821
|
+
parseOptions(argv: string[]): ParseOptionsResult;
|
|
822
|
+
/**
|
|
823
|
+
* Return an object containing local option values as key-value pairs
|
|
824
|
+
*/
|
|
825
|
+
opts(): Opts;
|
|
826
|
+
/**
|
|
827
|
+
* Return an object containing merged local and global option values as key-value pairs.
|
|
828
|
+
*/
|
|
829
|
+
optsWithGlobals(): Resolve<Opts & GlobalOpts>;
|
|
830
|
+
/**
|
|
831
|
+
* Set the description.
|
|
832
|
+
*
|
|
833
|
+
* @returns `this` command for chaining
|
|
834
|
+
*/
|
|
835
|
+
description(str: string): this;
|
|
836
|
+
/** @deprecated since v8, instead use .argument to add command argument with description */
|
|
837
|
+
description(str: string, argsDescription: Record<string, string>): this;
|
|
838
|
+
/**
|
|
839
|
+
* Get the description.
|
|
840
|
+
*/
|
|
841
|
+
description(): string;
|
|
842
|
+
/**
|
|
843
|
+
* Set the summary. Used when listed as subcommand of parent.
|
|
844
|
+
*
|
|
845
|
+
* @returns `this` command for chaining
|
|
846
|
+
*/
|
|
847
|
+
summary(str: string): this;
|
|
848
|
+
/**
|
|
849
|
+
* Get the summary.
|
|
850
|
+
*/
|
|
851
|
+
summary(): string;
|
|
852
|
+
/**
|
|
853
|
+
* Set an alias for the command.
|
|
854
|
+
*
|
|
855
|
+
* You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
|
|
856
|
+
*
|
|
857
|
+
* @returns `this` command for chaining
|
|
858
|
+
*/
|
|
859
|
+
alias(alias: string): this;
|
|
860
|
+
/**
|
|
861
|
+
* Get alias for the command.
|
|
862
|
+
*/
|
|
863
|
+
alias(): string;
|
|
864
|
+
/**
|
|
865
|
+
* Set aliases for the command.
|
|
866
|
+
*
|
|
867
|
+
* Only the first alias is shown in the auto-generated help.
|
|
868
|
+
*
|
|
869
|
+
* @returns `this` command for chaining
|
|
870
|
+
*/
|
|
871
|
+
aliases(aliases: readonly string[]): this;
|
|
872
|
+
/**
|
|
873
|
+
* Get aliases for the command.
|
|
874
|
+
*/
|
|
875
|
+
aliases(): string[];
|
|
876
|
+
/**
|
|
877
|
+
* Set the command usage.
|
|
878
|
+
*
|
|
879
|
+
* @returns `this` command for chaining
|
|
880
|
+
*/
|
|
881
|
+
usage(str: string): this;
|
|
882
|
+
/**
|
|
883
|
+
* Get the command usage.
|
|
884
|
+
*/
|
|
885
|
+
usage(): string;
|
|
886
|
+
/**
|
|
887
|
+
* Set the name of the command.
|
|
888
|
+
*
|
|
889
|
+
* @returns `this` command for chaining
|
|
890
|
+
*/
|
|
891
|
+
name(str: string): this;
|
|
892
|
+
/**
|
|
893
|
+
* Get the name of the command.
|
|
894
|
+
*/
|
|
895
|
+
name(): string;
|
|
896
|
+
/**
|
|
897
|
+
* Set the name of the command from script filename, such as process.argv[1],
|
|
898
|
+
* or require.main.filename, or __filename.
|
|
899
|
+
*
|
|
900
|
+
* (Used internally and public although not documented in README.)
|
|
901
|
+
*
|
|
902
|
+
* @example
|
|
903
|
+
* ```ts
|
|
904
|
+
* program.nameFromFilename(require.main.filename);
|
|
905
|
+
* ```
|
|
906
|
+
*
|
|
907
|
+
* @returns `this` command for chaining
|
|
908
|
+
*/
|
|
909
|
+
nameFromFilename(filename: string): this;
|
|
910
|
+
/**
|
|
911
|
+
* Set the directory for searching for executable subcommands of this command.
|
|
912
|
+
*
|
|
913
|
+
* @example
|
|
914
|
+
* ```ts
|
|
915
|
+
* program.executableDir(__dirname);
|
|
916
|
+
* // or
|
|
917
|
+
* program.executableDir('subcommands');
|
|
918
|
+
* ```
|
|
919
|
+
*
|
|
920
|
+
* @returns `this` command for chaining
|
|
921
|
+
*/
|
|
922
|
+
executableDir(path: string): this;
|
|
923
|
+
/**
|
|
924
|
+
* Get the executable search directory.
|
|
925
|
+
*/
|
|
926
|
+
executableDir(): string | null;
|
|
927
|
+
/**
|
|
928
|
+
* Set the help group heading for this subcommand in parent command's help.
|
|
929
|
+
*
|
|
930
|
+
* @returns `this` command for chaining
|
|
931
|
+
*/
|
|
932
|
+
helpGroup(heading: string): this;
|
|
933
|
+
/**
|
|
934
|
+
* Get the help group heading for this subcommand in parent command's help.
|
|
935
|
+
*/
|
|
936
|
+
helpGroup(): string;
|
|
937
|
+
/**
|
|
938
|
+
* Set the default help group heading for subcommands added to this command.
|
|
939
|
+
* (This does not override a group set directly on the subcommand using .helpGroup().)
|
|
940
|
+
*
|
|
941
|
+
* @example
|
|
942
|
+
* program.commandsGroup('Development Commands:);
|
|
943
|
+
* program.command('watch')...
|
|
944
|
+
* program.command('lint')...
|
|
945
|
+
* ...
|
|
946
|
+
*
|
|
947
|
+
* @returns `this` command for chaining
|
|
948
|
+
*/
|
|
949
|
+
commandsGroup(heading: string): this;
|
|
950
|
+
/**
|
|
951
|
+
* Get the default help group heading for subcommands added to this command.
|
|
952
|
+
*/
|
|
953
|
+
commandsGroup(): string;
|
|
954
|
+
/**
|
|
955
|
+
* Set the default help group heading for options added to this command.
|
|
956
|
+
* (This does not override a group set directly on the option using .helpGroup().)
|
|
957
|
+
*
|
|
958
|
+
* @example
|
|
959
|
+
* program
|
|
960
|
+
* .optionsGroup('Development Options:')
|
|
961
|
+
* .option('-d, --debug', 'output extra debugging')
|
|
962
|
+
* .option('-p, --profile', 'output profiling information')
|
|
963
|
+
*
|
|
964
|
+
* @returns `this` command for chaining
|
|
965
|
+
*/
|
|
966
|
+
optionsGroup(heading: string): this;
|
|
967
|
+
/**
|
|
968
|
+
* Get the default help group heading for options added to this command.
|
|
969
|
+
*/
|
|
970
|
+
optionsGroup(): string;
|
|
971
|
+
/**
|
|
972
|
+
* Output help information for this command.
|
|
973
|
+
*
|
|
974
|
+
* Outputs built-in help, and custom text added using `.addHelpText()`.
|
|
975
|
+
*
|
|
976
|
+
*/
|
|
977
|
+
outputHelp(context?: HelpContext): void;
|
|
978
|
+
/** @deprecated since v7 */
|
|
979
|
+
outputHelp(cb?: (str: string) => string): void;
|
|
980
|
+
/**
|
|
981
|
+
* Return command help documentation.
|
|
982
|
+
*/
|
|
983
|
+
helpInformation(context?: HelpContext): string;
|
|
984
|
+
/**
|
|
985
|
+
* You can pass in flags and a description to override the help
|
|
986
|
+
* flags and help description for your command. Pass in false
|
|
987
|
+
* to disable the built-in help option.
|
|
988
|
+
*/
|
|
989
|
+
helpOption(flags?: string | boolean, description?: string): this;
|
|
990
|
+
/**
|
|
991
|
+
* Supply your own option to use for the built-in help option.
|
|
992
|
+
* This is an alternative to using helpOption() to customise the flags and description etc.
|
|
993
|
+
*/
|
|
994
|
+
addHelpOption(option: Option): this;
|
|
995
|
+
/**
|
|
996
|
+
* Output help information and exit.
|
|
997
|
+
*
|
|
998
|
+
* Outputs built-in help, and custom text added using `.addHelpText()`.
|
|
999
|
+
*/
|
|
1000
|
+
help(context?: HelpContext): never;
|
|
1001
|
+
/** @deprecated since v7 */
|
|
1002
|
+
help(cb?: (str: string) => string): never;
|
|
1003
|
+
/**
|
|
1004
|
+
* Add additional text to be displayed with the built-in help.
|
|
1005
|
+
*
|
|
1006
|
+
* Position is 'before' or 'after' to affect just this command,
|
|
1007
|
+
* and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.
|
|
1008
|
+
*/
|
|
1009
|
+
addHelpText(position: AddHelpTextPosition, text: string): this;
|
|
1010
|
+
addHelpText(position: AddHelpTextPosition, text: (context: AddHelpTextContext) => string): this;
|
|
1011
|
+
/**
|
|
1012
|
+
* Add a listener (callback) for when events occur. (Implemented using EventEmitter.)
|
|
1013
|
+
*/
|
|
1014
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1015
|
+
}
|
|
1016
|
+
interface CommandOptions {
|
|
1017
|
+
hidden?: boolean;
|
|
1018
|
+
isDefault?: boolean;
|
|
1019
|
+
/** @deprecated since v7, replaced by hidden */
|
|
1020
|
+
noHelp?: boolean;
|
|
1021
|
+
}
|
|
1022
|
+
interface ExecutableCommandOptions extends CommandOptions {
|
|
1023
|
+
executableFile?: string;
|
|
1024
|
+
}
|
|
1025
|
+
interface ParseOptionsResult {
|
|
1026
|
+
operands: string[];
|
|
1027
|
+
unknown: string[];
|
|
1028
|
+
}
|
|
1029
|
+
//#endregion
|
|
1030
|
+
//#region src/processor-runner-program.d.ts
|
|
1031
|
+
declare const program: Command<[string], {
|
|
1032
|
+
port: string;
|
|
1033
|
+
concurrency: number;
|
|
1034
|
+
batchCount: number;
|
|
1035
|
+
chainsConfig: string;
|
|
1036
|
+
pricefeedServer?: string | undefined;
|
|
1037
|
+
logFormat: string;
|
|
1038
|
+
debug?: true | undefined;
|
|
1039
|
+
otlpDebug?: true | undefined;
|
|
1040
|
+
startActionServer?: true | undefined;
|
|
1041
|
+
worker: number;
|
|
1042
|
+
processTimeout: number;
|
|
1043
|
+
workerTimeout: number;
|
|
1044
|
+
enablePartition: boolean;
|
|
1045
|
+
}, {}>;
|
|
1046
|
+
type ProcessorRuntimeOptions = ReturnType<typeof program.opts> & {
|
|
1047
|
+
target: string;
|
|
1048
|
+
};
|
|
1049
|
+
//#endregion
|
|
1050
|
+
//#region src/service-v3.d.ts
|
|
1051
|
+
type ProcessStreamResponseV3Init = MessageInitShape<typeof ProcessStreamResponseV3Schema>;
|
|
1052
|
+
declare class ProcessorServiceImplV3 implements ServiceImpl<typeof ProcessorV3> {
|
|
1053
|
+
readonly enablePartition: boolean;
|
|
1054
|
+
private readonly loader;
|
|
1055
|
+
private readonly shutdownHandler?;
|
|
1056
|
+
private started;
|
|
1057
|
+
constructor(loader: () => Promise<any>, options?: ProcessorRuntimeOptions, shutdownHandler?: () => void);
|
|
1058
|
+
start(request: StartRequest, context: HandlerContext): Promise<import("@bufbuild/protobuf").Message<"google.protobuf.Empty">>;
|
|
1059
|
+
getConfig(request: ProcessConfigRequest, context: HandlerContext): Promise<import("@sentio/protos").ProcessConfigResponse>;
|
|
1060
|
+
processBindingsStream(requests: AsyncIterable<ProcessStreamRequest>, context: HandlerContext): AsyncGenerator<import("@sentio/protos").ProcessStreamResponseV3 | {
|
|
1061
|
+
readonly $typeName?: undefined;
|
|
1062
|
+
processId?: number | undefined;
|
|
1063
|
+
value?: {
|
|
1064
|
+
case: undefined;
|
|
1065
|
+
value?: undefined;
|
|
1066
|
+
} | {
|
|
1067
|
+
case: "partitions";
|
|
1068
|
+
value: import("@sentio/protos").ProcessStreamResponse_Partitions | {
|
|
1069
|
+
readonly $typeName?: undefined;
|
|
1070
|
+
partitions?: {
|
|
1071
|
+
[key: string]: import("@sentio/protos").ProcessStreamResponse_Partitions_Partition | {
|
|
1072
|
+
readonly $typeName?: undefined;
|
|
1073
|
+
value?: {
|
|
1074
|
+
value: string;
|
|
1075
|
+
case: "userValue";
|
|
1076
|
+
} | {
|
|
1077
|
+
value: import("@sentio/protos").ProcessStreamResponse_Partitions_Partition_SysValue;
|
|
1078
|
+
case: "sysValue";
|
|
1079
|
+
} | {
|
|
1080
|
+
case: undefined;
|
|
1081
|
+
value?: undefined;
|
|
1082
|
+
} | undefined;
|
|
1083
|
+
};
|
|
1084
|
+
[key: number]: import("@sentio/protos").ProcessStreamResponse_Partitions_Partition | {
|
|
1085
|
+
readonly $typeName?: undefined;
|
|
1086
|
+
value?: {
|
|
1087
|
+
value: string;
|
|
1088
|
+
case: "userValue";
|
|
1089
|
+
} | {
|
|
1090
|
+
value: import("@sentio/protos").ProcessStreamResponse_Partitions_Partition_SysValue;
|
|
1091
|
+
case: "sysValue";
|
|
1092
|
+
} | {
|
|
1093
|
+
case: undefined;
|
|
1094
|
+
value?: undefined;
|
|
1095
|
+
} | undefined;
|
|
1096
|
+
};
|
|
1097
|
+
} | undefined;
|
|
1098
|
+
};
|
|
1099
|
+
} | {
|
|
1100
|
+
case: "dbRequest";
|
|
1101
|
+
value: import("@sentio/protos").DBRequest | {
|
|
1102
|
+
readonly $typeName?: undefined;
|
|
1103
|
+
opId?: bigint | undefined;
|
|
1104
|
+
op?: {
|
|
1105
|
+
case: undefined;
|
|
1106
|
+
value?: undefined;
|
|
1107
|
+
} | {
|
|
1108
|
+
case: "get";
|
|
1109
|
+
value: import("@sentio/protos").DBRequest_DBGet | {
|
|
1110
|
+
readonly $typeName?: undefined;
|
|
1111
|
+
entity?: string | undefined;
|
|
1112
|
+
id?: string | undefined;
|
|
1113
|
+
};
|
|
1114
|
+
} | {
|
|
1115
|
+
case: "upsert";
|
|
1116
|
+
value: import("@sentio/protos").DBRequest_DBUpsert | {
|
|
1117
|
+
readonly $typeName?: undefined;
|
|
1118
|
+
entity?: string[] | undefined;
|
|
1119
|
+
id?: string[] | undefined;
|
|
1120
|
+
data?: import("@bufbuild/protobuf").JsonObject[] | undefined;
|
|
1121
|
+
entityData?: (import("@sentio/protos").RichStruct | {
|
|
1122
|
+
readonly $typeName?: undefined;
|
|
1123
|
+
fields?: {
|
|
1124
|
+
[key: string]: import("@sentio/protos").RichValue | {
|
|
1125
|
+
readonly $typeName?: undefined;
|
|
1126
|
+
value?: {
|
|
1127
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
1128
|
+
case: "nullValue";
|
|
1129
|
+
} | {
|
|
1130
|
+
value: number;
|
|
1131
|
+
case: "intValue";
|
|
1132
|
+
} | {
|
|
1133
|
+
value: bigint;
|
|
1134
|
+
case: "int64Value";
|
|
1135
|
+
} | {
|
|
1136
|
+
value: number;
|
|
1137
|
+
case: "floatValue";
|
|
1138
|
+
} | {
|
|
1139
|
+
value: Uint8Array;
|
|
1140
|
+
case: "bytesValue";
|
|
1141
|
+
} | {
|
|
1142
|
+
value: boolean;
|
|
1143
|
+
case: "boolValue";
|
|
1144
|
+
} | {
|
|
1145
|
+
value: string;
|
|
1146
|
+
case: "stringValue";
|
|
1147
|
+
} | {
|
|
1148
|
+
case: undefined;
|
|
1149
|
+
value?: undefined;
|
|
1150
|
+
} | {
|
|
1151
|
+
case: "timestampValue";
|
|
1152
|
+
value: import("@sentio/protos").Timestamp | {
|
|
1153
|
+
readonly $typeName?: undefined;
|
|
1154
|
+
seconds?: bigint | undefined;
|
|
1155
|
+
nanos?: number | undefined;
|
|
1156
|
+
};
|
|
1157
|
+
} | {
|
|
1158
|
+
case: "bigintValue";
|
|
1159
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1160
|
+
readonly $typeName?: undefined;
|
|
1161
|
+
negative?: boolean | undefined;
|
|
1162
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1163
|
+
};
|
|
1164
|
+
} | {
|
|
1165
|
+
case: "bigdecimalValue";
|
|
1166
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
1167
|
+
readonly $typeName?: undefined;
|
|
1168
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1169
|
+
readonly $typeName?: undefined;
|
|
1170
|
+
negative?: boolean | undefined;
|
|
1171
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1172
|
+
}) | undefined;
|
|
1173
|
+
exp?: number | undefined;
|
|
1174
|
+
};
|
|
1175
|
+
} | {
|
|
1176
|
+
case: "listValue";
|
|
1177
|
+
value: import("@sentio/protos").RichValueList | {
|
|
1178
|
+
readonly $typeName?: undefined;
|
|
1179
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
1180
|
+
};
|
|
1181
|
+
} | {
|
|
1182
|
+
case: "structValue";
|
|
1183
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
1184
|
+
} | {
|
|
1185
|
+
case: "tokenValue";
|
|
1186
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
1187
|
+
readonly $typeName?: undefined;
|
|
1188
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
1189
|
+
readonly $typeName?: undefined;
|
|
1190
|
+
id?: {
|
|
1191
|
+
value: string;
|
|
1192
|
+
case: "symbol";
|
|
1193
|
+
} | {
|
|
1194
|
+
case: undefined;
|
|
1195
|
+
value?: undefined;
|
|
1196
|
+
} | {
|
|
1197
|
+
case: "address";
|
|
1198
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
1199
|
+
readonly $typeName?: undefined;
|
|
1200
|
+
address?: string | undefined;
|
|
1201
|
+
chain?: string | undefined;
|
|
1202
|
+
};
|
|
1203
|
+
} | undefined;
|
|
1204
|
+
}) | undefined;
|
|
1205
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
1206
|
+
readonly $typeName?: undefined;
|
|
1207
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1208
|
+
readonly $typeName?: undefined;
|
|
1209
|
+
negative?: boolean | undefined;
|
|
1210
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1211
|
+
}) | undefined;
|
|
1212
|
+
exp?: number | undefined;
|
|
1213
|
+
}) | undefined;
|
|
1214
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
1215
|
+
readonly $typeName?: undefined;
|
|
1216
|
+
seconds?: bigint | undefined;
|
|
1217
|
+
nanos?: number | undefined;
|
|
1218
|
+
}) | undefined;
|
|
1219
|
+
};
|
|
1220
|
+
} | undefined;
|
|
1221
|
+
};
|
|
1222
|
+
[key: number]: import("@sentio/protos").RichValue | {
|
|
1223
|
+
readonly $typeName?: undefined;
|
|
1224
|
+
value?: {
|
|
1225
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
1226
|
+
case: "nullValue";
|
|
1227
|
+
} | {
|
|
1228
|
+
value: number;
|
|
1229
|
+
case: "intValue";
|
|
1230
|
+
} | {
|
|
1231
|
+
value: bigint;
|
|
1232
|
+
case: "int64Value";
|
|
1233
|
+
} | {
|
|
1234
|
+
value: number;
|
|
1235
|
+
case: "floatValue";
|
|
1236
|
+
} | {
|
|
1237
|
+
value: Uint8Array;
|
|
1238
|
+
case: "bytesValue";
|
|
1239
|
+
} | {
|
|
1240
|
+
value: boolean;
|
|
1241
|
+
case: "boolValue";
|
|
1242
|
+
} | {
|
|
1243
|
+
value: string;
|
|
1244
|
+
case: "stringValue";
|
|
1245
|
+
} | {
|
|
1246
|
+
case: undefined;
|
|
1247
|
+
value?: undefined;
|
|
1248
|
+
} | {
|
|
1249
|
+
case: "timestampValue";
|
|
1250
|
+
value: import("@sentio/protos").Timestamp | {
|
|
1251
|
+
readonly $typeName?: undefined;
|
|
1252
|
+
seconds?: bigint | undefined;
|
|
1253
|
+
nanos?: number | undefined;
|
|
1254
|
+
};
|
|
1255
|
+
} | {
|
|
1256
|
+
case: "bigintValue";
|
|
1257
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1258
|
+
readonly $typeName?: undefined;
|
|
1259
|
+
negative?: boolean | undefined;
|
|
1260
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1261
|
+
};
|
|
1262
|
+
} | {
|
|
1263
|
+
case: "bigdecimalValue";
|
|
1264
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
1265
|
+
readonly $typeName?: undefined;
|
|
1266
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1267
|
+
readonly $typeName?: undefined;
|
|
1268
|
+
negative?: boolean | undefined;
|
|
1269
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1270
|
+
}) | undefined;
|
|
1271
|
+
exp?: number | undefined;
|
|
1272
|
+
};
|
|
1273
|
+
} | {
|
|
1274
|
+
case: "listValue";
|
|
1275
|
+
value: import("@sentio/protos").RichValueList | {
|
|
1276
|
+
readonly $typeName?: undefined;
|
|
1277
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
1278
|
+
};
|
|
1279
|
+
} | {
|
|
1280
|
+
case: "structValue";
|
|
1281
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
1282
|
+
} | {
|
|
1283
|
+
case: "tokenValue";
|
|
1284
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
1285
|
+
readonly $typeName?: undefined;
|
|
1286
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
1287
|
+
readonly $typeName?: undefined;
|
|
1288
|
+
id?: {
|
|
1289
|
+
value: string;
|
|
1290
|
+
case: "symbol";
|
|
1291
|
+
} | {
|
|
1292
|
+
case: undefined;
|
|
1293
|
+
value?: undefined;
|
|
1294
|
+
} | {
|
|
1295
|
+
case: "address";
|
|
1296
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
1297
|
+
readonly $typeName?: undefined;
|
|
1298
|
+
address?: string | undefined;
|
|
1299
|
+
chain?: string | undefined;
|
|
1300
|
+
};
|
|
1301
|
+
} | undefined;
|
|
1302
|
+
}) | undefined;
|
|
1303
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
1304
|
+
readonly $typeName?: undefined;
|
|
1305
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1306
|
+
readonly $typeName?: undefined;
|
|
1307
|
+
negative?: boolean | undefined;
|
|
1308
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1309
|
+
}) | undefined;
|
|
1310
|
+
exp?: number | undefined;
|
|
1311
|
+
}) | undefined;
|
|
1312
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
1313
|
+
readonly $typeName?: undefined;
|
|
1314
|
+
seconds?: bigint | undefined;
|
|
1315
|
+
nanos?: number | undefined;
|
|
1316
|
+
}) | undefined;
|
|
1317
|
+
};
|
|
1318
|
+
} | undefined;
|
|
1319
|
+
};
|
|
1320
|
+
} | undefined;
|
|
1321
|
+
})[] | undefined;
|
|
1322
|
+
};
|
|
1323
|
+
} | {
|
|
1324
|
+
case: "update";
|
|
1325
|
+
value: import("@sentio/protos").DBRequest_DBUpdate | {
|
|
1326
|
+
readonly $typeName?: undefined;
|
|
1327
|
+
entity?: string[] | undefined;
|
|
1328
|
+
id?: string[] | undefined;
|
|
1329
|
+
entityData?: (import("@sentio/protos").EntityUpdateData | {
|
|
1330
|
+
readonly $typeName?: undefined;
|
|
1331
|
+
fields?: {
|
|
1332
|
+
[key: string]: import("@sentio/protos").EntityUpdateData_FieldValue | {
|
|
1333
|
+
readonly $typeName?: undefined;
|
|
1334
|
+
value?: (import("@sentio/protos").RichValue | {
|
|
1335
|
+
readonly $typeName?: undefined;
|
|
1336
|
+
value?: {
|
|
1337
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
1338
|
+
case: "nullValue";
|
|
1339
|
+
} | {
|
|
1340
|
+
value: number;
|
|
1341
|
+
case: "intValue";
|
|
1342
|
+
} | {
|
|
1343
|
+
value: bigint;
|
|
1344
|
+
case: "int64Value";
|
|
1345
|
+
} | {
|
|
1346
|
+
value: number;
|
|
1347
|
+
case: "floatValue";
|
|
1348
|
+
} | {
|
|
1349
|
+
value: Uint8Array;
|
|
1350
|
+
case: "bytesValue";
|
|
1351
|
+
} | {
|
|
1352
|
+
value: boolean;
|
|
1353
|
+
case: "boolValue";
|
|
1354
|
+
} | {
|
|
1355
|
+
value: string;
|
|
1356
|
+
case: "stringValue";
|
|
1357
|
+
} | {
|
|
1358
|
+
case: undefined;
|
|
1359
|
+
value?: undefined;
|
|
1360
|
+
} | {
|
|
1361
|
+
case: "timestampValue";
|
|
1362
|
+
value: import("@sentio/protos").Timestamp | {
|
|
1363
|
+
readonly $typeName?: undefined;
|
|
1364
|
+
seconds?: bigint | undefined;
|
|
1365
|
+
nanos?: number | undefined;
|
|
1366
|
+
};
|
|
1367
|
+
} | {
|
|
1368
|
+
case: "bigintValue";
|
|
1369
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1370
|
+
readonly $typeName?: undefined;
|
|
1371
|
+
negative?: boolean | undefined;
|
|
1372
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1373
|
+
};
|
|
1374
|
+
} | {
|
|
1375
|
+
case: "bigdecimalValue";
|
|
1376
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
1377
|
+
readonly $typeName?: undefined;
|
|
1378
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1379
|
+
readonly $typeName?: undefined;
|
|
1380
|
+
negative?: boolean | undefined;
|
|
1381
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1382
|
+
}) | undefined;
|
|
1383
|
+
exp?: number | undefined;
|
|
1384
|
+
};
|
|
1385
|
+
} | {
|
|
1386
|
+
case: "listValue";
|
|
1387
|
+
value: import("@sentio/protos").RichValueList | {
|
|
1388
|
+
readonly $typeName?: undefined;
|
|
1389
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
1390
|
+
};
|
|
1391
|
+
} | {
|
|
1392
|
+
case: "structValue";
|
|
1393
|
+
value: import("@sentio/protos").RichStruct | {
|
|
1394
|
+
readonly $typeName?: undefined;
|
|
1395
|
+
fields?: {
|
|
1396
|
+
[key: string]: import("@sentio/protos").RichValue | /*elided*/any;
|
|
1397
|
+
[key: number]: import("@sentio/protos").RichValue | /*elided*/any;
|
|
1398
|
+
} | undefined;
|
|
1399
|
+
};
|
|
1400
|
+
} | {
|
|
1401
|
+
case: "tokenValue";
|
|
1402
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
1403
|
+
readonly $typeName?: undefined;
|
|
1404
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
1405
|
+
readonly $typeName?: undefined;
|
|
1406
|
+
id?: {
|
|
1407
|
+
value: string;
|
|
1408
|
+
case: "symbol";
|
|
1409
|
+
} | {
|
|
1410
|
+
case: undefined;
|
|
1411
|
+
value?: undefined;
|
|
1412
|
+
} | {
|
|
1413
|
+
case: "address";
|
|
1414
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
1415
|
+
readonly $typeName?: undefined;
|
|
1416
|
+
address?: string | undefined;
|
|
1417
|
+
chain?: string | undefined;
|
|
1418
|
+
};
|
|
1419
|
+
} | undefined;
|
|
1420
|
+
}) | undefined;
|
|
1421
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
1422
|
+
readonly $typeName?: undefined;
|
|
1423
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1424
|
+
readonly $typeName?: undefined;
|
|
1425
|
+
negative?: boolean | undefined;
|
|
1426
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1427
|
+
}) | undefined;
|
|
1428
|
+
exp?: number | undefined;
|
|
1429
|
+
}) | undefined;
|
|
1430
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
1431
|
+
readonly $typeName?: undefined;
|
|
1432
|
+
seconds?: bigint | undefined;
|
|
1433
|
+
nanos?: number | undefined;
|
|
1434
|
+
}) | undefined;
|
|
1435
|
+
};
|
|
1436
|
+
} | undefined;
|
|
1437
|
+
}) | undefined;
|
|
1438
|
+
op?: import("@sentio/protos").EntityUpdateData_Operator | undefined;
|
|
1439
|
+
};
|
|
1440
|
+
[key: number]: import("@sentio/protos").EntityUpdateData_FieldValue | {
|
|
1441
|
+
readonly $typeName?: undefined;
|
|
1442
|
+
value?: (import("@sentio/protos").RichValue | {
|
|
1443
|
+
readonly $typeName?: undefined;
|
|
1444
|
+
value?: {
|
|
1445
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
1446
|
+
case: "nullValue";
|
|
1447
|
+
} | {
|
|
1448
|
+
value: number;
|
|
1449
|
+
case: "intValue";
|
|
1450
|
+
} | {
|
|
1451
|
+
value: bigint;
|
|
1452
|
+
case: "int64Value";
|
|
1453
|
+
} | {
|
|
1454
|
+
value: number;
|
|
1455
|
+
case: "floatValue";
|
|
1456
|
+
} | {
|
|
1457
|
+
value: Uint8Array;
|
|
1458
|
+
case: "bytesValue";
|
|
1459
|
+
} | {
|
|
1460
|
+
value: boolean;
|
|
1461
|
+
case: "boolValue";
|
|
1462
|
+
} | {
|
|
1463
|
+
value: string;
|
|
1464
|
+
case: "stringValue";
|
|
1465
|
+
} | {
|
|
1466
|
+
case: undefined;
|
|
1467
|
+
value?: undefined;
|
|
1468
|
+
} | {
|
|
1469
|
+
case: "timestampValue";
|
|
1470
|
+
value: import("@sentio/protos").Timestamp | {
|
|
1471
|
+
readonly $typeName?: undefined;
|
|
1472
|
+
seconds?: bigint | undefined;
|
|
1473
|
+
nanos?: number | undefined;
|
|
1474
|
+
};
|
|
1475
|
+
} | {
|
|
1476
|
+
case: "bigintValue";
|
|
1477
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1478
|
+
readonly $typeName?: undefined;
|
|
1479
|
+
negative?: boolean | undefined;
|
|
1480
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1481
|
+
};
|
|
1482
|
+
} | {
|
|
1483
|
+
case: "bigdecimalValue";
|
|
1484
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
1485
|
+
readonly $typeName?: undefined;
|
|
1486
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1487
|
+
readonly $typeName?: undefined;
|
|
1488
|
+
negative?: boolean | undefined;
|
|
1489
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1490
|
+
}) | undefined;
|
|
1491
|
+
exp?: number | undefined;
|
|
1492
|
+
};
|
|
1493
|
+
} | {
|
|
1494
|
+
case: "listValue";
|
|
1495
|
+
value: import("@sentio/protos").RichValueList | {
|
|
1496
|
+
readonly $typeName?: undefined;
|
|
1497
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
1498
|
+
};
|
|
1499
|
+
} | {
|
|
1500
|
+
case: "structValue";
|
|
1501
|
+
value: import("@sentio/protos").RichStruct | {
|
|
1502
|
+
readonly $typeName?: undefined;
|
|
1503
|
+
fields?: {
|
|
1504
|
+
[key: string]: import("@sentio/protos").RichValue | /*elided*/any;
|
|
1505
|
+
[key: number]: import("@sentio/protos").RichValue | /*elided*/any;
|
|
1506
|
+
} | undefined;
|
|
1507
|
+
};
|
|
1508
|
+
} | {
|
|
1509
|
+
case: "tokenValue";
|
|
1510
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
1511
|
+
readonly $typeName?: undefined;
|
|
1512
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
1513
|
+
readonly $typeName?: undefined;
|
|
1514
|
+
id?: {
|
|
1515
|
+
value: string;
|
|
1516
|
+
case: "symbol";
|
|
1517
|
+
} | {
|
|
1518
|
+
case: undefined;
|
|
1519
|
+
value?: undefined;
|
|
1520
|
+
} | {
|
|
1521
|
+
case: "address";
|
|
1522
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
1523
|
+
readonly $typeName?: undefined;
|
|
1524
|
+
address?: string | undefined;
|
|
1525
|
+
chain?: string | undefined;
|
|
1526
|
+
};
|
|
1527
|
+
} | undefined;
|
|
1528
|
+
}) | undefined;
|
|
1529
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
1530
|
+
readonly $typeName?: undefined;
|
|
1531
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1532
|
+
readonly $typeName?: undefined;
|
|
1533
|
+
negative?: boolean | undefined;
|
|
1534
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1535
|
+
}) | undefined;
|
|
1536
|
+
exp?: number | undefined;
|
|
1537
|
+
}) | undefined;
|
|
1538
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
1539
|
+
readonly $typeName?: undefined;
|
|
1540
|
+
seconds?: bigint | undefined;
|
|
1541
|
+
nanos?: number | undefined;
|
|
1542
|
+
}) | undefined;
|
|
1543
|
+
};
|
|
1544
|
+
} | undefined;
|
|
1545
|
+
}) | undefined;
|
|
1546
|
+
op?: import("@sentio/protos").EntityUpdateData_Operator | undefined;
|
|
1547
|
+
};
|
|
1548
|
+
} | undefined;
|
|
1549
|
+
})[] | undefined;
|
|
1550
|
+
};
|
|
1551
|
+
} | {
|
|
1552
|
+
case: "delete";
|
|
1553
|
+
value: import("@sentio/protos").DBRequest_DBDelete | {
|
|
1554
|
+
readonly $typeName?: undefined;
|
|
1555
|
+
entity?: string[] | undefined;
|
|
1556
|
+
id?: string[] | undefined;
|
|
1557
|
+
};
|
|
1558
|
+
} | {
|
|
1559
|
+
case: "list";
|
|
1560
|
+
value: import("@sentio/protos").DBRequest_DBList | {
|
|
1561
|
+
readonly $typeName?: undefined;
|
|
1562
|
+
entity?: string | undefined;
|
|
1563
|
+
filters?: (import("@sentio/protos").DBRequest_DBFilter | {
|
|
1564
|
+
readonly $typeName?: undefined;
|
|
1565
|
+
field?: string | undefined;
|
|
1566
|
+
op?: import("@sentio/protos").DBRequest_DBOperator | undefined;
|
|
1567
|
+
value?: (import("@sentio/protos").RichValueList | {
|
|
1568
|
+
readonly $typeName?: undefined;
|
|
1569
|
+
values?: (import("@sentio/protos").RichValue | {
|
|
1570
|
+
readonly $typeName?: undefined;
|
|
1571
|
+
value?: {
|
|
1572
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
1573
|
+
case: "nullValue";
|
|
1574
|
+
} | {
|
|
1575
|
+
value: number;
|
|
1576
|
+
case: "intValue";
|
|
1577
|
+
} | {
|
|
1578
|
+
value: bigint;
|
|
1579
|
+
case: "int64Value";
|
|
1580
|
+
} | {
|
|
1581
|
+
value: number;
|
|
1582
|
+
case: "floatValue";
|
|
1583
|
+
} | {
|
|
1584
|
+
value: Uint8Array;
|
|
1585
|
+
case: "bytesValue";
|
|
1586
|
+
} | {
|
|
1587
|
+
value: boolean;
|
|
1588
|
+
case: "boolValue";
|
|
1589
|
+
} | {
|
|
1590
|
+
value: string;
|
|
1591
|
+
case: "stringValue";
|
|
1592
|
+
} | {
|
|
1593
|
+
case: undefined;
|
|
1594
|
+
value?: undefined;
|
|
1595
|
+
} | {
|
|
1596
|
+
case: "timestampValue";
|
|
1597
|
+
value: import("@sentio/protos").Timestamp | {
|
|
1598
|
+
readonly $typeName?: undefined;
|
|
1599
|
+
seconds?: bigint | undefined;
|
|
1600
|
+
nanos?: number | undefined;
|
|
1601
|
+
};
|
|
1602
|
+
} | {
|
|
1603
|
+
case: "bigintValue";
|
|
1604
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1605
|
+
readonly $typeName?: undefined;
|
|
1606
|
+
negative?: boolean | undefined;
|
|
1607
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1608
|
+
};
|
|
1609
|
+
} | {
|
|
1610
|
+
case: "bigdecimalValue";
|
|
1611
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
1612
|
+
readonly $typeName?: undefined;
|
|
1613
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1614
|
+
readonly $typeName?: undefined;
|
|
1615
|
+
negative?: boolean | undefined;
|
|
1616
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1617
|
+
}) | undefined;
|
|
1618
|
+
exp?: number | undefined;
|
|
1619
|
+
};
|
|
1620
|
+
} | {
|
|
1621
|
+
case: "listValue";
|
|
1622
|
+
value: import("@sentio/protos").RichValueList | /*elided*/any;
|
|
1623
|
+
} | {
|
|
1624
|
+
case: "structValue";
|
|
1625
|
+
value: import("@sentio/protos").RichStruct | {
|
|
1626
|
+
readonly $typeName?: undefined;
|
|
1627
|
+
fields?: {
|
|
1628
|
+
[key: string]: import("@sentio/protos").RichValue | /*elided*/any;
|
|
1629
|
+
[key: number]: import("@sentio/protos").RichValue | /*elided*/any;
|
|
1630
|
+
} | undefined;
|
|
1631
|
+
};
|
|
1632
|
+
} | {
|
|
1633
|
+
case: "tokenValue";
|
|
1634
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
1635
|
+
readonly $typeName?: undefined;
|
|
1636
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
1637
|
+
readonly $typeName?: undefined;
|
|
1638
|
+
id?: {
|
|
1639
|
+
value: string;
|
|
1640
|
+
case: "symbol";
|
|
1641
|
+
} | {
|
|
1642
|
+
case: undefined;
|
|
1643
|
+
value?: undefined;
|
|
1644
|
+
} | {
|
|
1645
|
+
case: "address";
|
|
1646
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
1647
|
+
readonly $typeName?: undefined;
|
|
1648
|
+
address?: string | undefined;
|
|
1649
|
+
chain?: string | undefined;
|
|
1650
|
+
};
|
|
1651
|
+
} | undefined;
|
|
1652
|
+
}) | undefined;
|
|
1653
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
1654
|
+
readonly $typeName?: undefined;
|
|
1655
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1656
|
+
readonly $typeName?: undefined;
|
|
1657
|
+
negative?: boolean | undefined;
|
|
1658
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1659
|
+
}) | undefined;
|
|
1660
|
+
exp?: number | undefined;
|
|
1661
|
+
}) | undefined;
|
|
1662
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
1663
|
+
readonly $typeName?: undefined;
|
|
1664
|
+
seconds?: bigint | undefined;
|
|
1665
|
+
nanos?: number | undefined;
|
|
1666
|
+
}) | undefined;
|
|
1667
|
+
};
|
|
1668
|
+
} | undefined;
|
|
1669
|
+
})[] | undefined;
|
|
1670
|
+
}) | undefined;
|
|
1671
|
+
})[] | undefined;
|
|
1672
|
+
cursor?: string | undefined;
|
|
1673
|
+
pageSize?: number | undefined | undefined;
|
|
1674
|
+
};
|
|
1675
|
+
} | undefined;
|
|
1676
|
+
};
|
|
1677
|
+
} | {
|
|
1678
|
+
case: "tsRequest";
|
|
1679
|
+
value: import("@sentio/protos").TSRequest | {
|
|
1680
|
+
readonly $typeName?: undefined;
|
|
1681
|
+
data?: (import("@sentio/protos").TimeseriesResult | {
|
|
1682
|
+
readonly $typeName?: undefined;
|
|
1683
|
+
metadata?: (import("@sentio/protos").RecordMetaData | {
|
|
1684
|
+
readonly $typeName?: undefined;
|
|
1685
|
+
address?: string | undefined;
|
|
1686
|
+
contractName?: string | undefined;
|
|
1687
|
+
blockNumber?: bigint | undefined;
|
|
1688
|
+
transactionHash?: string | undefined;
|
|
1689
|
+
chainId?: string | undefined;
|
|
1690
|
+
transactionIndex?: number | undefined;
|
|
1691
|
+
logIndex?: number | undefined;
|
|
1692
|
+
name?: string | undefined;
|
|
1693
|
+
labels?: {
|
|
1694
|
+
[key: string]: string;
|
|
1695
|
+
} | undefined;
|
|
1696
|
+
}) | undefined;
|
|
1697
|
+
type?: import("@sentio/protos").TimeseriesResult_TimeseriesType | undefined;
|
|
1698
|
+
data?: (import("@sentio/protos").RichStruct | {
|
|
1699
|
+
readonly $typeName?: undefined;
|
|
1700
|
+
fields?: {
|
|
1701
|
+
[key: string]: import("@sentio/protos").RichValue | {
|
|
1702
|
+
readonly $typeName?: undefined;
|
|
1703
|
+
value?: {
|
|
1704
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
1705
|
+
case: "nullValue";
|
|
1706
|
+
} | {
|
|
1707
|
+
value: number;
|
|
1708
|
+
case: "intValue";
|
|
1709
|
+
} | {
|
|
1710
|
+
value: bigint;
|
|
1711
|
+
case: "int64Value";
|
|
1712
|
+
} | {
|
|
1713
|
+
value: number;
|
|
1714
|
+
case: "floatValue";
|
|
1715
|
+
} | {
|
|
1716
|
+
value: Uint8Array;
|
|
1717
|
+
case: "bytesValue";
|
|
1718
|
+
} | {
|
|
1719
|
+
value: boolean;
|
|
1720
|
+
case: "boolValue";
|
|
1721
|
+
} | {
|
|
1722
|
+
value: string;
|
|
1723
|
+
case: "stringValue";
|
|
1724
|
+
} | {
|
|
1725
|
+
case: undefined;
|
|
1726
|
+
value?: undefined;
|
|
1727
|
+
} | {
|
|
1728
|
+
case: "timestampValue";
|
|
1729
|
+
value: import("@sentio/protos").Timestamp | {
|
|
1730
|
+
readonly $typeName?: undefined;
|
|
1731
|
+
seconds?: bigint | undefined;
|
|
1732
|
+
nanos?: number | undefined;
|
|
1733
|
+
};
|
|
1734
|
+
} | {
|
|
1735
|
+
case: "bigintValue";
|
|
1736
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1737
|
+
readonly $typeName?: undefined;
|
|
1738
|
+
negative?: boolean | undefined;
|
|
1739
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1740
|
+
};
|
|
1741
|
+
} | {
|
|
1742
|
+
case: "bigdecimalValue";
|
|
1743
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
1744
|
+
readonly $typeName?: undefined;
|
|
1745
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1746
|
+
readonly $typeName?: undefined;
|
|
1747
|
+
negative?: boolean | undefined;
|
|
1748
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1749
|
+
}) | undefined;
|
|
1750
|
+
exp?: number | undefined;
|
|
1751
|
+
};
|
|
1752
|
+
} | {
|
|
1753
|
+
case: "listValue";
|
|
1754
|
+
value: import("@sentio/protos").RichValueList | {
|
|
1755
|
+
readonly $typeName?: undefined;
|
|
1756
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
1757
|
+
};
|
|
1758
|
+
} | {
|
|
1759
|
+
case: "structValue";
|
|
1760
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
1761
|
+
} | {
|
|
1762
|
+
case: "tokenValue";
|
|
1763
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
1764
|
+
readonly $typeName?: undefined;
|
|
1765
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
1766
|
+
readonly $typeName?: undefined;
|
|
1767
|
+
id?: {
|
|
1768
|
+
value: string;
|
|
1769
|
+
case: "symbol";
|
|
1770
|
+
} | {
|
|
1771
|
+
case: undefined;
|
|
1772
|
+
value?: undefined;
|
|
1773
|
+
} | {
|
|
1774
|
+
case: "address";
|
|
1775
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
1776
|
+
readonly $typeName?: undefined;
|
|
1777
|
+
address?: string | undefined;
|
|
1778
|
+
chain?: string | undefined;
|
|
1779
|
+
};
|
|
1780
|
+
} | undefined;
|
|
1781
|
+
}) | undefined;
|
|
1782
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
1783
|
+
readonly $typeName?: undefined;
|
|
1784
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1785
|
+
readonly $typeName?: undefined;
|
|
1786
|
+
negative?: boolean | undefined;
|
|
1787
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1788
|
+
}) | undefined;
|
|
1789
|
+
exp?: number | undefined;
|
|
1790
|
+
}) | undefined;
|
|
1791
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
1792
|
+
readonly $typeName?: undefined;
|
|
1793
|
+
seconds?: bigint | undefined;
|
|
1794
|
+
nanos?: number | undefined;
|
|
1795
|
+
}) | undefined;
|
|
1796
|
+
};
|
|
1797
|
+
} | undefined;
|
|
1798
|
+
};
|
|
1799
|
+
[key: number]: import("@sentio/protos").RichValue | {
|
|
1800
|
+
readonly $typeName?: undefined;
|
|
1801
|
+
value?: {
|
|
1802
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
1803
|
+
case: "nullValue";
|
|
1804
|
+
} | {
|
|
1805
|
+
value: number;
|
|
1806
|
+
case: "intValue";
|
|
1807
|
+
} | {
|
|
1808
|
+
value: bigint;
|
|
1809
|
+
case: "int64Value";
|
|
1810
|
+
} | {
|
|
1811
|
+
value: number;
|
|
1812
|
+
case: "floatValue";
|
|
1813
|
+
} | {
|
|
1814
|
+
value: Uint8Array;
|
|
1815
|
+
case: "bytesValue";
|
|
1816
|
+
} | {
|
|
1817
|
+
value: boolean;
|
|
1818
|
+
case: "boolValue";
|
|
1819
|
+
} | {
|
|
1820
|
+
value: string;
|
|
1821
|
+
case: "stringValue";
|
|
1822
|
+
} | {
|
|
1823
|
+
case: undefined;
|
|
1824
|
+
value?: undefined;
|
|
1825
|
+
} | {
|
|
1826
|
+
case: "timestampValue";
|
|
1827
|
+
value: import("@sentio/protos").Timestamp | {
|
|
1828
|
+
readonly $typeName?: undefined;
|
|
1829
|
+
seconds?: bigint | undefined;
|
|
1830
|
+
nanos?: number | undefined;
|
|
1831
|
+
};
|
|
1832
|
+
} | {
|
|
1833
|
+
case: "bigintValue";
|
|
1834
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1835
|
+
readonly $typeName?: undefined;
|
|
1836
|
+
negative?: boolean | undefined;
|
|
1837
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1838
|
+
};
|
|
1839
|
+
} | {
|
|
1840
|
+
case: "bigdecimalValue";
|
|
1841
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
1842
|
+
readonly $typeName?: undefined;
|
|
1843
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1844
|
+
readonly $typeName?: undefined;
|
|
1845
|
+
negative?: boolean | undefined;
|
|
1846
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1847
|
+
}) | undefined;
|
|
1848
|
+
exp?: number | undefined;
|
|
1849
|
+
};
|
|
1850
|
+
} | {
|
|
1851
|
+
case: "listValue";
|
|
1852
|
+
value: import("@sentio/protos").RichValueList | {
|
|
1853
|
+
readonly $typeName?: undefined;
|
|
1854
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
1855
|
+
};
|
|
1856
|
+
} | {
|
|
1857
|
+
case: "structValue";
|
|
1858
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
1859
|
+
} | {
|
|
1860
|
+
case: "tokenValue";
|
|
1861
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
1862
|
+
readonly $typeName?: undefined;
|
|
1863
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
1864
|
+
readonly $typeName?: undefined;
|
|
1865
|
+
id?: {
|
|
1866
|
+
value: string;
|
|
1867
|
+
case: "symbol";
|
|
1868
|
+
} | {
|
|
1869
|
+
case: undefined;
|
|
1870
|
+
value?: undefined;
|
|
1871
|
+
} | {
|
|
1872
|
+
case: "address";
|
|
1873
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
1874
|
+
readonly $typeName?: undefined;
|
|
1875
|
+
address?: string | undefined;
|
|
1876
|
+
chain?: string | undefined;
|
|
1877
|
+
};
|
|
1878
|
+
} | undefined;
|
|
1879
|
+
}) | undefined;
|
|
1880
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
1881
|
+
readonly $typeName?: undefined;
|
|
1882
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
1883
|
+
readonly $typeName?: undefined;
|
|
1884
|
+
negative?: boolean | undefined;
|
|
1885
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1886
|
+
}) | undefined;
|
|
1887
|
+
exp?: number | undefined;
|
|
1888
|
+
}) | undefined;
|
|
1889
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
1890
|
+
readonly $typeName?: undefined;
|
|
1891
|
+
seconds?: bigint | undefined;
|
|
1892
|
+
nanos?: number | undefined;
|
|
1893
|
+
}) | undefined;
|
|
1894
|
+
};
|
|
1895
|
+
} | undefined;
|
|
1896
|
+
};
|
|
1897
|
+
} | undefined;
|
|
1898
|
+
}) | undefined;
|
|
1899
|
+
runtimeInfo?: (import("@sentio/protos").RuntimeInfo | {
|
|
1900
|
+
readonly $typeName?: undefined;
|
|
1901
|
+
from?: HandlerType | undefined;
|
|
1902
|
+
}) | undefined;
|
|
1903
|
+
})[] | undefined;
|
|
1904
|
+
};
|
|
1905
|
+
} | {
|
|
1906
|
+
case: "tplRequest";
|
|
1907
|
+
value: import("@sentio/protos").TPLRequest | {
|
|
1908
|
+
readonly $typeName?: undefined;
|
|
1909
|
+
templates?: (import("@sentio/protos").TemplateInstance | {
|
|
1910
|
+
readonly $typeName?: undefined;
|
|
1911
|
+
contract?: (import("@sentio/protos").ContractInfo | {
|
|
1912
|
+
readonly $typeName?: undefined;
|
|
1913
|
+
name?: string | undefined;
|
|
1914
|
+
chainId?: string | undefined;
|
|
1915
|
+
address?: string | undefined;
|
|
1916
|
+
abi?: string | undefined;
|
|
1917
|
+
}) | undefined;
|
|
1918
|
+
startBlock?: bigint | undefined;
|
|
1919
|
+
endBlock?: bigint | undefined;
|
|
1920
|
+
templateId?: number | undefined;
|
|
1921
|
+
baseLabels?: import("@bufbuild/protobuf").JsonObject | undefined;
|
|
1922
|
+
})[] | undefined;
|
|
1923
|
+
remove?: boolean | undefined;
|
|
1924
|
+
};
|
|
1925
|
+
} | {
|
|
1926
|
+
case: "result";
|
|
1927
|
+
value: import("@sentio/protos").ProcessResult | {
|
|
1928
|
+
readonly $typeName?: undefined;
|
|
1929
|
+
gauges?: (import("@sentio/protos").GaugeResult | {
|
|
1930
|
+
readonly $typeName?: undefined;
|
|
1931
|
+
metadata?: (import("@sentio/protos").RecordMetaData | {
|
|
1932
|
+
readonly $typeName?: undefined;
|
|
1933
|
+
address?: string | undefined;
|
|
1934
|
+
contractName?: string | undefined;
|
|
1935
|
+
blockNumber?: bigint | undefined;
|
|
1936
|
+
transactionHash?: string | undefined;
|
|
1937
|
+
chainId?: string | undefined;
|
|
1938
|
+
transactionIndex?: number | undefined;
|
|
1939
|
+
logIndex?: number | undefined;
|
|
1940
|
+
name?: string | undefined;
|
|
1941
|
+
labels?: {
|
|
1942
|
+
[key: string]: string;
|
|
1943
|
+
} | undefined;
|
|
1944
|
+
}) | undefined;
|
|
1945
|
+
metricValue?: (import("@sentio/protos").MetricValue | {
|
|
1946
|
+
readonly $typeName?: undefined;
|
|
1947
|
+
value?: {
|
|
1948
|
+
value: string;
|
|
1949
|
+
case: "bigDecimal";
|
|
1950
|
+
} | {
|
|
1951
|
+
value: number;
|
|
1952
|
+
case: "doubleValue";
|
|
1953
|
+
} | {
|
|
1954
|
+
case: undefined;
|
|
1955
|
+
value?: undefined;
|
|
1956
|
+
} | {
|
|
1957
|
+
case: "bigInteger";
|
|
1958
|
+
value: import("@sentio/protos").BigInteger | {
|
|
1959
|
+
readonly $typeName?: undefined;
|
|
1960
|
+
negative?: boolean | undefined;
|
|
1961
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
1962
|
+
};
|
|
1963
|
+
} | undefined;
|
|
1964
|
+
}) | undefined;
|
|
1965
|
+
runtimeInfo?: (import("@sentio/protos").RuntimeInfo | {
|
|
1966
|
+
readonly $typeName?: undefined;
|
|
1967
|
+
from?: HandlerType | undefined;
|
|
1968
|
+
}) | undefined;
|
|
1969
|
+
})[] | undefined;
|
|
1970
|
+
counters?: (import("@sentio/protos").CounterResult | {
|
|
1971
|
+
readonly $typeName?: undefined;
|
|
1972
|
+
metadata?: (import("@sentio/protos").RecordMetaData | {
|
|
1973
|
+
readonly $typeName?: undefined;
|
|
1974
|
+
address?: string | undefined;
|
|
1975
|
+
contractName?: string | undefined;
|
|
1976
|
+
blockNumber?: bigint | undefined;
|
|
1977
|
+
transactionHash?: string | undefined;
|
|
1978
|
+
chainId?: string | undefined;
|
|
1979
|
+
transactionIndex?: number | undefined;
|
|
1980
|
+
logIndex?: number | undefined;
|
|
1981
|
+
name?: string | undefined;
|
|
1982
|
+
labels?: {
|
|
1983
|
+
[key: string]: string;
|
|
1984
|
+
} | undefined;
|
|
1985
|
+
}) | undefined;
|
|
1986
|
+
metricValue?: (import("@sentio/protos").MetricValue | {
|
|
1987
|
+
readonly $typeName?: undefined;
|
|
1988
|
+
value?: {
|
|
1989
|
+
value: string;
|
|
1990
|
+
case: "bigDecimal";
|
|
1991
|
+
} | {
|
|
1992
|
+
value: number;
|
|
1993
|
+
case: "doubleValue";
|
|
1994
|
+
} | {
|
|
1995
|
+
case: undefined;
|
|
1996
|
+
value?: undefined;
|
|
1997
|
+
} | {
|
|
1998
|
+
case: "bigInteger";
|
|
1999
|
+
value: import("@sentio/protos").BigInteger | {
|
|
2000
|
+
readonly $typeName?: undefined;
|
|
2001
|
+
negative?: boolean | undefined;
|
|
2002
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2003
|
+
};
|
|
2004
|
+
} | undefined;
|
|
2005
|
+
}) | undefined;
|
|
2006
|
+
add?: boolean | undefined;
|
|
2007
|
+
runtimeInfo?: (import("@sentio/protos").RuntimeInfo | {
|
|
2008
|
+
readonly $typeName?: undefined;
|
|
2009
|
+
from?: HandlerType | undefined;
|
|
2010
|
+
}) | undefined;
|
|
2011
|
+
})[] | undefined;
|
|
2012
|
+
events?: (import("@sentio/protos").EventTrackingResult | {
|
|
2013
|
+
readonly $typeName?: undefined;
|
|
2014
|
+
metadata?: (import("@sentio/protos").RecordMetaData | {
|
|
2015
|
+
readonly $typeName?: undefined;
|
|
2016
|
+
address?: string | undefined;
|
|
2017
|
+
contractName?: string | undefined;
|
|
2018
|
+
blockNumber?: bigint | undefined;
|
|
2019
|
+
transactionHash?: string | undefined;
|
|
2020
|
+
chainId?: string | undefined;
|
|
2021
|
+
transactionIndex?: number | undefined;
|
|
2022
|
+
logIndex?: number | undefined;
|
|
2023
|
+
name?: string | undefined;
|
|
2024
|
+
labels?: {
|
|
2025
|
+
[key: string]: string;
|
|
2026
|
+
} | undefined;
|
|
2027
|
+
}) | undefined;
|
|
2028
|
+
distinctEntityId?: string | undefined;
|
|
2029
|
+
attributes?: import("@bufbuild/protobuf").JsonObject | undefined;
|
|
2030
|
+
severity?: import("@sentio/protos").LogLevel | undefined;
|
|
2031
|
+
message?: string | undefined;
|
|
2032
|
+
runtimeInfo?: (import("@sentio/protos").RuntimeInfo | {
|
|
2033
|
+
readonly $typeName?: undefined;
|
|
2034
|
+
from?: HandlerType | undefined;
|
|
2035
|
+
}) | undefined;
|
|
2036
|
+
attributes2?: (import("@sentio/protos").RichStruct | {
|
|
2037
|
+
readonly $typeName?: undefined;
|
|
2038
|
+
fields?: {
|
|
2039
|
+
[key: string]: import("@sentio/protos").RichValue | {
|
|
2040
|
+
readonly $typeName?: undefined;
|
|
2041
|
+
value?: {
|
|
2042
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
2043
|
+
case: "nullValue";
|
|
2044
|
+
} | {
|
|
2045
|
+
value: number;
|
|
2046
|
+
case: "intValue";
|
|
2047
|
+
} | {
|
|
2048
|
+
value: bigint;
|
|
2049
|
+
case: "int64Value";
|
|
2050
|
+
} | {
|
|
2051
|
+
value: number;
|
|
2052
|
+
case: "floatValue";
|
|
2053
|
+
} | {
|
|
2054
|
+
value: Uint8Array;
|
|
2055
|
+
case: "bytesValue";
|
|
2056
|
+
} | {
|
|
2057
|
+
value: boolean;
|
|
2058
|
+
case: "boolValue";
|
|
2059
|
+
} | {
|
|
2060
|
+
value: string;
|
|
2061
|
+
case: "stringValue";
|
|
2062
|
+
} | {
|
|
2063
|
+
case: undefined;
|
|
2064
|
+
value?: undefined;
|
|
2065
|
+
} | {
|
|
2066
|
+
case: "timestampValue";
|
|
2067
|
+
value: import("@sentio/protos").Timestamp | {
|
|
2068
|
+
readonly $typeName?: undefined;
|
|
2069
|
+
seconds?: bigint | undefined;
|
|
2070
|
+
nanos?: number | undefined;
|
|
2071
|
+
};
|
|
2072
|
+
} | {
|
|
2073
|
+
case: "bigintValue";
|
|
2074
|
+
value: import("@sentio/protos").BigInteger | {
|
|
2075
|
+
readonly $typeName?: undefined;
|
|
2076
|
+
negative?: boolean | undefined;
|
|
2077
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2078
|
+
};
|
|
2079
|
+
} | {
|
|
2080
|
+
case: "bigdecimalValue";
|
|
2081
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
2082
|
+
readonly $typeName?: undefined;
|
|
2083
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2084
|
+
readonly $typeName?: undefined;
|
|
2085
|
+
negative?: boolean | undefined;
|
|
2086
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2087
|
+
}) | undefined;
|
|
2088
|
+
exp?: number | undefined;
|
|
2089
|
+
};
|
|
2090
|
+
} | {
|
|
2091
|
+
case: "listValue";
|
|
2092
|
+
value: import("@sentio/protos").RichValueList | {
|
|
2093
|
+
readonly $typeName?: undefined;
|
|
2094
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
2095
|
+
};
|
|
2096
|
+
} | {
|
|
2097
|
+
case: "structValue";
|
|
2098
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
2099
|
+
} | {
|
|
2100
|
+
case: "tokenValue";
|
|
2101
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
2102
|
+
readonly $typeName?: undefined;
|
|
2103
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
2104
|
+
readonly $typeName?: undefined;
|
|
2105
|
+
id?: {
|
|
2106
|
+
value: string;
|
|
2107
|
+
case: "symbol";
|
|
2108
|
+
} | {
|
|
2109
|
+
case: undefined;
|
|
2110
|
+
value?: undefined;
|
|
2111
|
+
} | {
|
|
2112
|
+
case: "address";
|
|
2113
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
2114
|
+
readonly $typeName?: undefined;
|
|
2115
|
+
address?: string | undefined;
|
|
2116
|
+
chain?: string | undefined;
|
|
2117
|
+
};
|
|
2118
|
+
} | undefined;
|
|
2119
|
+
}) | undefined;
|
|
2120
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
2121
|
+
readonly $typeName?: undefined;
|
|
2122
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2123
|
+
readonly $typeName?: undefined;
|
|
2124
|
+
negative?: boolean | undefined;
|
|
2125
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2126
|
+
}) | undefined;
|
|
2127
|
+
exp?: number | undefined;
|
|
2128
|
+
}) | undefined;
|
|
2129
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
2130
|
+
readonly $typeName?: undefined;
|
|
2131
|
+
seconds?: bigint | undefined;
|
|
2132
|
+
nanos?: number | undefined;
|
|
2133
|
+
}) | undefined;
|
|
2134
|
+
};
|
|
2135
|
+
} | undefined;
|
|
2136
|
+
};
|
|
2137
|
+
[key: number]: import("@sentio/protos").RichValue | {
|
|
2138
|
+
readonly $typeName?: undefined;
|
|
2139
|
+
value?: {
|
|
2140
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
2141
|
+
case: "nullValue";
|
|
2142
|
+
} | {
|
|
2143
|
+
value: number;
|
|
2144
|
+
case: "intValue";
|
|
2145
|
+
} | {
|
|
2146
|
+
value: bigint;
|
|
2147
|
+
case: "int64Value";
|
|
2148
|
+
} | {
|
|
2149
|
+
value: number;
|
|
2150
|
+
case: "floatValue";
|
|
2151
|
+
} | {
|
|
2152
|
+
value: Uint8Array;
|
|
2153
|
+
case: "bytesValue";
|
|
2154
|
+
} | {
|
|
2155
|
+
value: boolean;
|
|
2156
|
+
case: "boolValue";
|
|
2157
|
+
} | {
|
|
2158
|
+
value: string;
|
|
2159
|
+
case: "stringValue";
|
|
2160
|
+
} | {
|
|
2161
|
+
case: undefined;
|
|
2162
|
+
value?: undefined;
|
|
2163
|
+
} | {
|
|
2164
|
+
case: "timestampValue";
|
|
2165
|
+
value: import("@sentio/protos").Timestamp | {
|
|
2166
|
+
readonly $typeName?: undefined;
|
|
2167
|
+
seconds?: bigint | undefined;
|
|
2168
|
+
nanos?: number | undefined;
|
|
2169
|
+
};
|
|
2170
|
+
} | {
|
|
2171
|
+
case: "bigintValue";
|
|
2172
|
+
value: import("@sentio/protos").BigInteger | {
|
|
2173
|
+
readonly $typeName?: undefined;
|
|
2174
|
+
negative?: boolean | undefined;
|
|
2175
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2176
|
+
};
|
|
2177
|
+
} | {
|
|
2178
|
+
case: "bigdecimalValue";
|
|
2179
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
2180
|
+
readonly $typeName?: undefined;
|
|
2181
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2182
|
+
readonly $typeName?: undefined;
|
|
2183
|
+
negative?: boolean | undefined;
|
|
2184
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2185
|
+
}) | undefined;
|
|
2186
|
+
exp?: number | undefined;
|
|
2187
|
+
};
|
|
2188
|
+
} | {
|
|
2189
|
+
case: "listValue";
|
|
2190
|
+
value: import("@sentio/protos").RichValueList | {
|
|
2191
|
+
readonly $typeName?: undefined;
|
|
2192
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
2193
|
+
};
|
|
2194
|
+
} | {
|
|
2195
|
+
case: "structValue";
|
|
2196
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
2197
|
+
} | {
|
|
2198
|
+
case: "tokenValue";
|
|
2199
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
2200
|
+
readonly $typeName?: undefined;
|
|
2201
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
2202
|
+
readonly $typeName?: undefined;
|
|
2203
|
+
id?: {
|
|
2204
|
+
value: string;
|
|
2205
|
+
case: "symbol";
|
|
2206
|
+
} | {
|
|
2207
|
+
case: undefined;
|
|
2208
|
+
value?: undefined;
|
|
2209
|
+
} | {
|
|
2210
|
+
case: "address";
|
|
2211
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
2212
|
+
readonly $typeName?: undefined;
|
|
2213
|
+
address?: string | undefined;
|
|
2214
|
+
chain?: string | undefined;
|
|
2215
|
+
};
|
|
2216
|
+
} | undefined;
|
|
2217
|
+
}) | undefined;
|
|
2218
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
2219
|
+
readonly $typeName?: undefined;
|
|
2220
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2221
|
+
readonly $typeName?: undefined;
|
|
2222
|
+
negative?: boolean | undefined;
|
|
2223
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2224
|
+
}) | undefined;
|
|
2225
|
+
exp?: number | undefined;
|
|
2226
|
+
}) | undefined;
|
|
2227
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
2228
|
+
readonly $typeName?: undefined;
|
|
2229
|
+
seconds?: bigint | undefined;
|
|
2230
|
+
nanos?: number | undefined;
|
|
2231
|
+
}) | undefined;
|
|
2232
|
+
};
|
|
2233
|
+
} | undefined;
|
|
2234
|
+
};
|
|
2235
|
+
} | undefined;
|
|
2236
|
+
}) | undefined;
|
|
2237
|
+
})[] | undefined;
|
|
2238
|
+
exports?: (import("@sentio/protos").ExportResult | {
|
|
2239
|
+
readonly $typeName?: undefined;
|
|
2240
|
+
metadata?: (import("@sentio/protos").RecordMetaData | {
|
|
2241
|
+
readonly $typeName?: undefined;
|
|
2242
|
+
address?: string | undefined;
|
|
2243
|
+
contractName?: string | undefined;
|
|
2244
|
+
blockNumber?: bigint | undefined;
|
|
2245
|
+
transactionHash?: string | undefined;
|
|
2246
|
+
chainId?: string | undefined;
|
|
2247
|
+
transactionIndex?: number | undefined;
|
|
2248
|
+
logIndex?: number | undefined;
|
|
2249
|
+
name?: string | undefined;
|
|
2250
|
+
labels?: {
|
|
2251
|
+
[key: string]: string;
|
|
2252
|
+
} | undefined;
|
|
2253
|
+
}) | undefined;
|
|
2254
|
+
payload?: string | undefined;
|
|
2255
|
+
runtimeInfo?: (import("@sentio/protos").RuntimeInfo | {
|
|
2256
|
+
readonly $typeName?: undefined;
|
|
2257
|
+
from?: HandlerType | undefined;
|
|
2258
|
+
}) | undefined;
|
|
2259
|
+
})[] | undefined;
|
|
2260
|
+
states?: (import("@sentio/protos").StateResult | {
|
|
2261
|
+
readonly $typeName?: undefined;
|
|
2262
|
+
configUpdated?: boolean | undefined;
|
|
2263
|
+
error?: string | undefined | undefined;
|
|
2264
|
+
}) | undefined;
|
|
2265
|
+
timeseriesResult?: (import("@sentio/protos").TimeseriesResult | {
|
|
2266
|
+
readonly $typeName?: undefined;
|
|
2267
|
+
metadata?: (import("@sentio/protos").RecordMetaData | {
|
|
2268
|
+
readonly $typeName?: undefined;
|
|
2269
|
+
address?: string | undefined;
|
|
2270
|
+
contractName?: string | undefined;
|
|
2271
|
+
blockNumber?: bigint | undefined;
|
|
2272
|
+
transactionHash?: string | undefined;
|
|
2273
|
+
chainId?: string | undefined;
|
|
2274
|
+
transactionIndex?: number | undefined;
|
|
2275
|
+
logIndex?: number | undefined;
|
|
2276
|
+
name?: string | undefined;
|
|
2277
|
+
labels?: {
|
|
2278
|
+
[key: string]: string;
|
|
2279
|
+
} | undefined;
|
|
2280
|
+
}) | undefined;
|
|
2281
|
+
type?: import("@sentio/protos").TimeseriesResult_TimeseriesType | undefined;
|
|
2282
|
+
data?: (import("@sentio/protos").RichStruct | {
|
|
2283
|
+
readonly $typeName?: undefined;
|
|
2284
|
+
fields?: {
|
|
2285
|
+
[key: string]: import("@sentio/protos").RichValue | {
|
|
2286
|
+
readonly $typeName?: undefined;
|
|
2287
|
+
value?: {
|
|
2288
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
2289
|
+
case: "nullValue";
|
|
2290
|
+
} | {
|
|
2291
|
+
value: number;
|
|
2292
|
+
case: "intValue";
|
|
2293
|
+
} | {
|
|
2294
|
+
value: bigint;
|
|
2295
|
+
case: "int64Value";
|
|
2296
|
+
} | {
|
|
2297
|
+
value: number;
|
|
2298
|
+
case: "floatValue";
|
|
2299
|
+
} | {
|
|
2300
|
+
value: Uint8Array;
|
|
2301
|
+
case: "bytesValue";
|
|
2302
|
+
} | {
|
|
2303
|
+
value: boolean;
|
|
2304
|
+
case: "boolValue";
|
|
2305
|
+
} | {
|
|
2306
|
+
value: string;
|
|
2307
|
+
case: "stringValue";
|
|
2308
|
+
} | {
|
|
2309
|
+
case: undefined;
|
|
2310
|
+
value?: undefined;
|
|
2311
|
+
} | {
|
|
2312
|
+
case: "timestampValue";
|
|
2313
|
+
value: import("@sentio/protos").Timestamp | {
|
|
2314
|
+
readonly $typeName?: undefined;
|
|
2315
|
+
seconds?: bigint | undefined;
|
|
2316
|
+
nanos?: number | undefined;
|
|
2317
|
+
};
|
|
2318
|
+
} | {
|
|
2319
|
+
case: "bigintValue";
|
|
2320
|
+
value: import("@sentio/protos").BigInteger | {
|
|
2321
|
+
readonly $typeName?: undefined;
|
|
2322
|
+
negative?: boolean | undefined;
|
|
2323
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2324
|
+
};
|
|
2325
|
+
} | {
|
|
2326
|
+
case: "bigdecimalValue";
|
|
2327
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
2328
|
+
readonly $typeName?: undefined;
|
|
2329
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2330
|
+
readonly $typeName?: undefined;
|
|
2331
|
+
negative?: boolean | undefined;
|
|
2332
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2333
|
+
}) | undefined;
|
|
2334
|
+
exp?: number | undefined;
|
|
2335
|
+
};
|
|
2336
|
+
} | {
|
|
2337
|
+
case: "listValue";
|
|
2338
|
+
value: import("@sentio/protos").RichValueList | {
|
|
2339
|
+
readonly $typeName?: undefined;
|
|
2340
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
2341
|
+
};
|
|
2342
|
+
} | {
|
|
2343
|
+
case: "structValue";
|
|
2344
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
2345
|
+
} | {
|
|
2346
|
+
case: "tokenValue";
|
|
2347
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
2348
|
+
readonly $typeName?: undefined;
|
|
2349
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
2350
|
+
readonly $typeName?: undefined;
|
|
2351
|
+
id?: {
|
|
2352
|
+
value: string;
|
|
2353
|
+
case: "symbol";
|
|
2354
|
+
} | {
|
|
2355
|
+
case: undefined;
|
|
2356
|
+
value?: undefined;
|
|
2357
|
+
} | {
|
|
2358
|
+
case: "address";
|
|
2359
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
2360
|
+
readonly $typeName?: undefined;
|
|
2361
|
+
address?: string | undefined;
|
|
2362
|
+
chain?: string | undefined;
|
|
2363
|
+
};
|
|
2364
|
+
} | undefined;
|
|
2365
|
+
}) | undefined;
|
|
2366
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
2367
|
+
readonly $typeName?: undefined;
|
|
2368
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2369
|
+
readonly $typeName?: undefined;
|
|
2370
|
+
negative?: boolean | undefined;
|
|
2371
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2372
|
+
}) | undefined;
|
|
2373
|
+
exp?: number | undefined;
|
|
2374
|
+
}) | undefined;
|
|
2375
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
2376
|
+
readonly $typeName?: undefined;
|
|
2377
|
+
seconds?: bigint | undefined;
|
|
2378
|
+
nanos?: number | undefined;
|
|
2379
|
+
}) | undefined;
|
|
2380
|
+
};
|
|
2381
|
+
} | undefined;
|
|
2382
|
+
};
|
|
2383
|
+
[key: number]: import("@sentio/protos").RichValue | {
|
|
2384
|
+
readonly $typeName?: undefined;
|
|
2385
|
+
value?: {
|
|
2386
|
+
value: import("@sentio/protos").RichValue_NullValue;
|
|
2387
|
+
case: "nullValue";
|
|
2388
|
+
} | {
|
|
2389
|
+
value: number;
|
|
2390
|
+
case: "intValue";
|
|
2391
|
+
} | {
|
|
2392
|
+
value: bigint;
|
|
2393
|
+
case: "int64Value";
|
|
2394
|
+
} | {
|
|
2395
|
+
value: number;
|
|
2396
|
+
case: "floatValue";
|
|
2397
|
+
} | {
|
|
2398
|
+
value: Uint8Array;
|
|
2399
|
+
case: "bytesValue";
|
|
2400
|
+
} | {
|
|
2401
|
+
value: boolean;
|
|
2402
|
+
case: "boolValue";
|
|
2403
|
+
} | {
|
|
2404
|
+
value: string;
|
|
2405
|
+
case: "stringValue";
|
|
2406
|
+
} | {
|
|
2407
|
+
case: undefined;
|
|
2408
|
+
value?: undefined;
|
|
2409
|
+
} | {
|
|
2410
|
+
case: "timestampValue";
|
|
2411
|
+
value: import("@sentio/protos").Timestamp | {
|
|
2412
|
+
readonly $typeName?: undefined;
|
|
2413
|
+
seconds?: bigint | undefined;
|
|
2414
|
+
nanos?: number | undefined;
|
|
2415
|
+
};
|
|
2416
|
+
} | {
|
|
2417
|
+
case: "bigintValue";
|
|
2418
|
+
value: import("@sentio/protos").BigInteger | {
|
|
2419
|
+
readonly $typeName?: undefined;
|
|
2420
|
+
negative?: boolean | undefined;
|
|
2421
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2422
|
+
};
|
|
2423
|
+
} | {
|
|
2424
|
+
case: "bigdecimalValue";
|
|
2425
|
+
value: import("@sentio/protos").BigDecimalRichValue | {
|
|
2426
|
+
readonly $typeName?: undefined;
|
|
2427
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2428
|
+
readonly $typeName?: undefined;
|
|
2429
|
+
negative?: boolean | undefined;
|
|
2430
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2431
|
+
}) | undefined;
|
|
2432
|
+
exp?: number | undefined;
|
|
2433
|
+
};
|
|
2434
|
+
} | {
|
|
2435
|
+
case: "listValue";
|
|
2436
|
+
value: import("@sentio/protos").RichValueList | {
|
|
2437
|
+
readonly $typeName?: undefined;
|
|
2438
|
+
values?: (import("@sentio/protos").RichValue | /*elided*/any)[] | undefined;
|
|
2439
|
+
};
|
|
2440
|
+
} | {
|
|
2441
|
+
case: "structValue";
|
|
2442
|
+
value: import("@sentio/protos").RichStruct | /*elided*/any;
|
|
2443
|
+
} | {
|
|
2444
|
+
case: "tokenValue";
|
|
2445
|
+
value: import("@sentio/protos").TokenAmount | {
|
|
2446
|
+
readonly $typeName?: undefined;
|
|
2447
|
+
token?: (import("@sentio/protos").CoinID | {
|
|
2448
|
+
readonly $typeName?: undefined;
|
|
2449
|
+
id?: {
|
|
2450
|
+
value: string;
|
|
2451
|
+
case: "symbol";
|
|
2452
|
+
} | {
|
|
2453
|
+
case: undefined;
|
|
2454
|
+
value?: undefined;
|
|
2455
|
+
} | {
|
|
2456
|
+
case: "address";
|
|
2457
|
+
value: import("@sentio/protos").CoinID_AddressIdentifier | {
|
|
2458
|
+
readonly $typeName?: undefined;
|
|
2459
|
+
address?: string | undefined;
|
|
2460
|
+
chain?: string | undefined;
|
|
2461
|
+
};
|
|
2462
|
+
} | undefined;
|
|
2463
|
+
}) | undefined;
|
|
2464
|
+
amount?: (import("@sentio/protos").BigDecimalRichValue | {
|
|
2465
|
+
readonly $typeName?: undefined;
|
|
2466
|
+
value?: (import("@sentio/protos").BigInteger | {
|
|
2467
|
+
readonly $typeName?: undefined;
|
|
2468
|
+
negative?: boolean | undefined;
|
|
2469
|
+
data?: Uint8Array<ArrayBufferLike> | undefined;
|
|
2470
|
+
}) | undefined;
|
|
2471
|
+
exp?: number | undefined;
|
|
2472
|
+
}) | undefined;
|
|
2473
|
+
specifiedAt?: (import("@sentio/protos").Timestamp | {
|
|
2474
|
+
readonly $typeName?: undefined;
|
|
2475
|
+
seconds?: bigint | undefined;
|
|
2476
|
+
nanos?: number | undefined;
|
|
2477
|
+
}) | undefined;
|
|
2478
|
+
};
|
|
2479
|
+
} | undefined;
|
|
2480
|
+
};
|
|
2481
|
+
} | undefined;
|
|
2482
|
+
}) | undefined;
|
|
2483
|
+
runtimeInfo?: (import("@sentio/protos").RuntimeInfo | {
|
|
2484
|
+
readonly $typeName?: undefined;
|
|
2485
|
+
from?: HandlerType | undefined;
|
|
2486
|
+
}) | undefined;
|
|
2487
|
+
})[] | undefined;
|
|
2488
|
+
};
|
|
2489
|
+
} | undefined;
|
|
2490
|
+
}, void, any>;
|
|
2491
|
+
protected handleRequests(requests: AsyncIterable<ProcessStreamRequest>, subject: Subject<ProcessStreamResponseV3Init>): Promise<void>;
|
|
2492
|
+
private contexts;
|
|
2493
|
+
handleRequest(request: ProcessStreamRequest, lastBinding: DataBinding | undefined, subject: Subject<ProcessStreamResponseV3Init>): Promise<void>;
|
|
2494
|
+
private startProcess;
|
|
2495
|
+
updateTemplates(request: UpdateTemplatesRequest, context: HandlerContext): Promise<import("@bufbuild/protobuf").Message<"google.protobuf.Empty">>;
|
|
2496
|
+
}
|
|
2497
|
+
//#endregion
|
|
2498
|
+
//#region src/global-config.d.ts
|
|
2499
|
+
/**
|
|
2500
|
+
* Configuration for the in-memory cache feature.
|
|
2501
|
+
*
|
|
2502
|
+
* The cache provides a key-value store that persists across handler invocations,
|
|
2503
|
+
* allowing processors to store and retrieve computed values efficiently.
|
|
2504
|
+
*/
|
|
2505
|
+
interface CacheConfig {
|
|
2506
|
+
/**
|
|
2507
|
+
* Whether the cache feature is enabled.
|
|
2508
|
+
* When enabled, a MemoryCacheItem entity will be automatically added to the schema.
|
|
2509
|
+
* @default true
|
|
2510
|
+
*/
|
|
2511
|
+
enabled: boolean;
|
|
2512
|
+
/**
|
|
2513
|
+
* Maximum size of the cache in megabytes.
|
|
2514
|
+
* Controls the memory limit for cached items.
|
|
2515
|
+
* @default 100
|
|
2516
|
+
*/
|
|
2517
|
+
size?: number;
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* Global configuration for the Sentio SDK runtime.
|
|
2521
|
+
*
|
|
2522
|
+
* This configuration controls execution behavior and optional features like caching.
|
|
2523
|
+
* Settings here apply globally to all processors in the project.
|
|
2524
|
+
*/
|
|
2525
|
+
interface GlobalConfig {
|
|
2526
|
+
/**
|
|
2527
|
+
* Execution configuration controlling how handlers are processed.
|
|
2528
|
+
* Includes settings for sequential vs parallel execution, block time handling, etc.
|
|
2529
|
+
*/
|
|
2530
|
+
execution: MessageInitShape<typeof ExecutionConfigSchema>;
|
|
2531
|
+
/**
|
|
2532
|
+
* Optional cache configuration for enabling in-memory key-value storage.
|
|
2533
|
+
* When enabled, processors can use `ctx.cache` to store and retrieve values.
|
|
2534
|
+
*
|
|
2535
|
+
* @example
|
|
2536
|
+
* ```typescript
|
|
2537
|
+
* // In your processor handler:
|
|
2538
|
+
* const cachedValue = await ctx.cache.get<number>('myKey')
|
|
2539
|
+
* if (!cachedValue) {
|
|
2540
|
+
* await ctx.cache.set('myKey', computedValue)
|
|
2541
|
+
* }
|
|
2542
|
+
* ```
|
|
2543
|
+
*/
|
|
2544
|
+
cache?: CacheConfig;
|
|
2545
|
+
}
|
|
2546
|
+
declare const GLOBAL_CONFIG: GlobalConfig;
|
|
2547
|
+
//#endregion
|
|
2548
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/context/types.d.ts
|
|
2549
|
+
interface Context {
|
|
2550
|
+
/**
|
|
2551
|
+
* Get a value from the context.
|
|
2552
|
+
*
|
|
2553
|
+
* @param key key which identifies a context value
|
|
2554
|
+
*/
|
|
2555
|
+
getValue(key: symbol): unknown;
|
|
2556
|
+
/**
|
|
2557
|
+
* Create a new context which inherits from this context and has
|
|
2558
|
+
* the given key set to the given value.
|
|
2559
|
+
*
|
|
2560
|
+
* @param key context key for which to set the value
|
|
2561
|
+
* @param value value to set for the given key
|
|
2562
|
+
*/
|
|
2563
|
+
setValue(key: symbol, value: unknown): Context;
|
|
2564
|
+
/**
|
|
2565
|
+
* Return a new context which inherits from this context but does
|
|
2566
|
+
* not contain a value for the given key.
|
|
2567
|
+
*
|
|
2568
|
+
* @param key context key for which to clear a value
|
|
2569
|
+
*/
|
|
2570
|
+
deleteValue(key: symbol): Context;
|
|
2571
|
+
}
|
|
2572
|
+
//#endregion
|
|
2573
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/common/Attributes.d.ts
|
|
2574
|
+
/**
|
|
2575
|
+
* Attributes is a map from string to attribute values.
|
|
2576
|
+
*
|
|
2577
|
+
* Note: only the own enumerable keys are counted as valid attribute keys.
|
|
2578
|
+
*/
|
|
2579
|
+
interface Attributes {
|
|
2580
|
+
[attributeKey: string]: AttributeValue | undefined;
|
|
2581
|
+
}
|
|
2582
|
+
/**
|
|
2583
|
+
* Attribute values may be any non-nullish primitive value except an object.
|
|
2584
|
+
*
|
|
2585
|
+
* null or undefined attribute values are invalid and will result in undefined behavior.
|
|
2586
|
+
*/
|
|
2587
|
+
declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
|
2588
|
+
//#endregion
|
|
2589
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts
|
|
2590
|
+
/**
|
|
2591
|
+
* Counter is the most common synchronous instrument. This instrument supports
|
|
2592
|
+
* an `Add(increment)` function for reporting a sum, and is restricted to
|
|
2593
|
+
* non-negative increments. The default aggregation is Sum, as for any additive
|
|
2594
|
+
* instrument.
|
|
2595
|
+
*
|
|
2596
|
+
* Example uses for Counter:
|
|
2597
|
+
* <ol>
|
|
2598
|
+
* <li> count the number of bytes received. </li>
|
|
2599
|
+
* <li> count the number of requests completed. </li>
|
|
2600
|
+
* <li> count the number of accounts created. </li>
|
|
2601
|
+
* <li> count the number of checkpoints run. </li>
|
|
2602
|
+
* <li> count the number of 5xx errors. </li>
|
|
2603
|
+
* <ol>
|
|
2604
|
+
*/
|
|
2605
|
+
interface Counter<AttributesTypes extends MetricAttributes = MetricAttributes> {
|
|
2606
|
+
/**
|
|
2607
|
+
* Increment value of counter by the input. Inputs must not be negative.
|
|
2608
|
+
*/
|
|
2609
|
+
add(value: number, attributes?: AttributesTypes, context?: Context): void;
|
|
2610
|
+
}
|
|
2611
|
+
interface Gauge<AttributesTypes extends MetricAttributes = MetricAttributes> {
|
|
2612
|
+
/**
|
|
2613
|
+
* Records a measurement.
|
|
2614
|
+
*/
|
|
2615
|
+
record(value: number, attributes?: AttributesTypes, context?: Context): void;
|
|
2616
|
+
}
|
|
2617
|
+
interface Histogram<AttributesTypes extends MetricAttributes = MetricAttributes> {
|
|
2618
|
+
/**
|
|
2619
|
+
* Records a measurement. Value of the measurement must not be negative.
|
|
2620
|
+
*/
|
|
2621
|
+
record(value: number, attributes?: AttributesTypes, context?: Context): void;
|
|
2622
|
+
}
|
|
2623
|
+
/**
|
|
2624
|
+
* @deprecated please use {@link Attributes}
|
|
2625
|
+
*/
|
|
2626
|
+
declare type MetricAttributes = Attributes;
|
|
2627
|
+
//#endregion
|
|
2628
|
+
//#region src/metrics.d.ts
|
|
2629
|
+
declare class C {
|
|
2630
|
+
private name;
|
|
2631
|
+
private _counter;
|
|
2632
|
+
private value;
|
|
2633
|
+
constructor(name: string);
|
|
2634
|
+
get counter(): Counter<Attributes>;
|
|
2635
|
+
add(value: number, attributes?: Attributes): void;
|
|
2636
|
+
get(): number;
|
|
2637
|
+
}
|
|
2638
|
+
declare class G {
|
|
2639
|
+
private name;
|
|
2640
|
+
private _gauge;
|
|
2641
|
+
private value;
|
|
2642
|
+
constructor(name: string);
|
|
2643
|
+
get gauge(): Gauge<Attributes>;
|
|
2644
|
+
record(value: number, attributes?: Attributes): void;
|
|
2645
|
+
get(): number;
|
|
2646
|
+
}
|
|
2647
|
+
declare class H {
|
|
2648
|
+
private name;
|
|
2649
|
+
private _histogram;
|
|
2650
|
+
private value;
|
|
2651
|
+
constructor(name: string);
|
|
2652
|
+
get histogram(): Histogram<Attributes>;
|
|
2653
|
+
record(value: number, attributes?: Attributes): void;
|
|
2654
|
+
get(): number;
|
|
2655
|
+
}
|
|
2656
|
+
declare const dbMetrics: {
|
|
2657
|
+
send_counts: {
|
|
2658
|
+
get: C;
|
|
2659
|
+
upsert: C;
|
|
2660
|
+
list: C;
|
|
2661
|
+
delete: C;
|
|
2662
|
+
update: C;
|
|
2663
|
+
};
|
|
2664
|
+
recv_counts: {
|
|
2665
|
+
get: C;
|
|
2666
|
+
upsert: C;
|
|
2667
|
+
list: C;
|
|
2668
|
+
delete: C;
|
|
2669
|
+
update: C;
|
|
2670
|
+
};
|
|
2671
|
+
request_times: {
|
|
2672
|
+
get: C;
|
|
2673
|
+
upsert: C;
|
|
2674
|
+
list: C;
|
|
2675
|
+
delete: C;
|
|
2676
|
+
update: C;
|
|
2677
|
+
};
|
|
2678
|
+
request_errors: {
|
|
2679
|
+
get: C;
|
|
2680
|
+
upsert: C;
|
|
2681
|
+
list: C;
|
|
2682
|
+
delete: C;
|
|
2683
|
+
update: C;
|
|
2684
|
+
};
|
|
2685
|
+
batched_total_count: C;
|
|
2686
|
+
batched_request_count: C;
|
|
2687
|
+
unsolved_requests: G;
|
|
2688
|
+
stats(): {
|
|
2689
|
+
send_counts: {
|
|
2690
|
+
get: number;
|
|
2691
|
+
upsert: number;
|
|
2692
|
+
list: number;
|
|
2693
|
+
delete: number;
|
|
2694
|
+
};
|
|
2695
|
+
recv_counts: {
|
|
2696
|
+
get: number;
|
|
2697
|
+
upsert: number;
|
|
2698
|
+
list: number;
|
|
2699
|
+
delete: number;
|
|
2700
|
+
};
|
|
2701
|
+
request_times: {
|
|
2702
|
+
get: number;
|
|
2703
|
+
upsert: number;
|
|
2704
|
+
list: number;
|
|
2705
|
+
delete: number;
|
|
2706
|
+
};
|
|
2707
|
+
request_errors: {
|
|
2708
|
+
get: number;
|
|
2709
|
+
upsert: number;
|
|
2710
|
+
list: number;
|
|
2711
|
+
delete: number;
|
|
2712
|
+
};
|
|
2713
|
+
batched_total_count: number;
|
|
2714
|
+
batched_request_count: number;
|
|
2715
|
+
unsolved_requests: number;
|
|
2716
|
+
average_request_time: {
|
|
2717
|
+
get: number;
|
|
2718
|
+
upsert: number;
|
|
2719
|
+
list: number;
|
|
2720
|
+
};
|
|
2721
|
+
};
|
|
2722
|
+
};
|
|
2723
|
+
declare const providerMetrics: {
|
|
2724
|
+
hit_count: C;
|
|
2725
|
+
miss_count: C;
|
|
2726
|
+
queue_size: G;
|
|
2727
|
+
total_duration: C;
|
|
2728
|
+
total_queued: C;
|
|
2729
|
+
stats(): {
|
|
2730
|
+
hit_count: number;
|
|
2731
|
+
miss_count: number;
|
|
2732
|
+
queue_size: number;
|
|
2733
|
+
total_duration: number;
|
|
2734
|
+
total_queued: number;
|
|
2735
|
+
average_queue_time: number;
|
|
2736
|
+
average_duration: number;
|
|
2737
|
+
};
|
|
2738
|
+
};
|
|
2739
|
+
declare const processMetrics: {
|
|
2740
|
+
process_binding_count: C;
|
|
2741
|
+
process_binding_time: C;
|
|
2742
|
+
process_binding_error: C;
|
|
2743
|
+
process_ethcall_count: C;
|
|
2744
|
+
process_eventemit_count: C;
|
|
2745
|
+
process_metricrecord_count: C;
|
|
2746
|
+
process_pricecall_count: C;
|
|
2747
|
+
process_template_count: C;
|
|
2748
|
+
process_handler_duration: G;
|
|
2749
|
+
processor_handler_duration: H;
|
|
2750
|
+
processor_rpc_duration: H;
|
|
2751
|
+
processor_rpc_queue_duration: H;
|
|
2752
|
+
processor_template_instance_count: C;
|
|
2753
|
+
processor_worker_run_time: C;
|
|
2754
|
+
processor_worker_wait_time: C;
|
|
2755
|
+
processor_worker_queue_size: G;
|
|
2756
|
+
processor_worker_completed: C;
|
|
2757
|
+
stats(): {
|
|
2758
|
+
process_binding_count: number;
|
|
2759
|
+
process_binding_time: number;
|
|
2760
|
+
process_binding_error: number;
|
|
2761
|
+
process_ethcall_count: number;
|
|
2762
|
+
process_eventemit_count: number;
|
|
2763
|
+
process_metricrecord_count: number;
|
|
2764
|
+
process_pricecall_count: number;
|
|
2765
|
+
process_template_count: number;
|
|
2766
|
+
process_handler_duration: number;
|
|
2767
|
+
processor_handler_duration: number;
|
|
2768
|
+
processor_rpc_duration: number;
|
|
2769
|
+
processor_rpc_queue_duration: number;
|
|
2770
|
+
processor_template_instance_count: number;
|
|
2771
|
+
processor_worker_run_time: number;
|
|
2772
|
+
processor_worker_wait_time: number;
|
|
2773
|
+
processor_worker_queue_size: number;
|
|
2774
|
+
processor_worker_completed: number;
|
|
2775
|
+
};
|
|
2776
|
+
};
|
|
2777
|
+
declare const metricsStorage: AsyncLocalStorage<string>;
|
|
2778
|
+
//#endregion
|
|
2779
|
+
export { AbstractStoreContext, ChainConfig, ChainRpc, DataBindingContext, Endpoints, GLOBAL_CONFIG, type GlobalConfig, IDataBindingContext, IStoreContext, ListStateStorage, MapStateStorage, Plugin, PluginManager, ProcessorServiceImplV3, RpcConfig, Semver, State, StateStorage, StoreContext, USER_PROCESSOR, compareSemver, configureEndpoints, dbMetrics, errorString, locatePackageJson, makeEthCallKey, mergeProcessResults, mergeProcessResultsInPlace, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo, timeoutError };
|
|
2780
|
+
//# sourceMappingURL=index.d.ts.map
|