dogecoin-core-trpc-api 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1350 @@
1
+ //#region node_modules/@trpc/server/dist/index.d-D4qZxQJh.d.mts
2
+ //#region src/observable/types.d.ts
3
+ interface Unsubscribable {
4
+ unsubscribe(): void;
5
+ }
6
+ interface Subscribable<TValue, TError> {
7
+ subscribe(observer: Partial<Observer<TValue, TError>>): Unsubscribable;
8
+ }
9
+ interface Observable<TValue, TError> extends Subscribable<TValue, TError> {
10
+ pipe(): Observable<TValue, TError>;
11
+ pipe<TValue1, TError1>(op1: OperatorFunction<TValue, TError, TValue1, TError1>): Observable<TValue1, TError1>;
12
+ pipe<TValue1, TError1, TValue2, TError2>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>): Observable<TValue2, TError2>;
13
+ pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>, op3: OperatorFunction<TValue2, TError2, TValue3, TError3>): Observable<TValue2, TError2>;
14
+ pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3, TValue4, TError4>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>, op3: OperatorFunction<TValue2, TError2, TValue3, TError3>, op4: OperatorFunction<TValue3, TError3, TValue4, TError4>): Observable<TValue2, TError2>;
15
+ pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3, TValue4, TError4, TValue5, TError5>(op1: OperatorFunction<TValue, TError, TValue1, TError1>, op2: OperatorFunction<TValue1, TError1, TValue2, TError2>, op3: OperatorFunction<TValue2, TError2, TValue3, TError3>, op4: OperatorFunction<TValue3, TError3, TValue4, TError4>, op5: OperatorFunction<TValue4, TError4, TValue5, TError5>): Observable<TValue2, TError2>;
16
+ }
17
+ interface Observer<TValue, TError> {
18
+ next: (value: TValue) => void;
19
+ error: (err: TError) => void;
20
+ complete: () => void;
21
+ }
22
+ type UnaryFunction<TSource, TReturn> = (source: TSource) => TReturn;
23
+ type OperatorFunction<TValueBefore, TErrorBefore, TValueAfter, TErrorAfter> = UnaryFunction<Subscribable<TValueBefore, TErrorBefore>, Subscribable<TValueAfter, TErrorAfter>>;
24
+ //#endregion
25
+ //#region node_modules/@trpc/server/dist/unstable-core-do-not-import.d-BdVSvUCr.d.mts
26
+ //#region src/unstable-core-do-not-import/types.d.ts
27
+ /**
28
+ * ================================
29
+ * Useful utility types that doesn't have anything to do with tRPC in particular
30
+ * ================================
31
+ */
32
+ /**
33
+ * @public
34
+ */
35
+ type Maybe<TType> = TType | null | undefined;
36
+ /**
37
+ * @internal
38
+ * @see https://github.com/ianstormtaylor/superstruct/blob/7973400cd04d8ad92bbdc2b6f35acbfb3c934079/src/utils.ts#L323-L325
39
+ */
40
+ type Simplify<TType> = TType extends any[] | Date ? TType : { [K in keyof TType]: TType[K] };
41
+ /**
42
+ * @public
43
+ */
44
+ /**
45
+ * @public
46
+ */
47
+ type MaybePromise<TType> = Promise<TType> | TType;
48
+ /**
49
+ * See https://github.com/microsoft/TypeScript/issues/41966#issuecomment-758187996
50
+ * Fixes issues with iterating over keys of objects with index signatures.
51
+ * Without this, iterations over keys of objects with index signatures will lose
52
+ * type information about the keys and only the index signature will remain.
53
+ * @internal
54
+ */
55
+ type WithoutIndexSignature<TObj> = { [K in keyof TObj as string extends K ? never : number extends K ? never : K]: TObj[K] };
56
+ /**
57
+ * @internal
58
+ * Overwrite properties in `TType` with properties in `TWith`
59
+ * Only overwrites properties when the type to be overwritten
60
+ * is an object. Otherwise it will just use the type from `TWith`.
61
+ */
62
+ /**
63
+ * @internal
64
+ * Returns the raw input type of a procedure
65
+ */
66
+ type GetRawInputFn = () => Promise<unknown>;
67
+ declare const _errorSymbol: unique symbol;
68
+ type TypeError<TMessage extends string> = TMessage & {
69
+ _: typeof _errorSymbol;
70
+ };
71
+ type ValueOf<TObj> = TObj[keyof TObj];
72
+ /**
73
+ * @internal
74
+ * Infers the type of the value yielded by an async iterable
75
+ */
76
+ type inferAsyncIterableYield<T> = T extends AsyncIterable<infer U> ? U : T; //#endregion
77
+ //#region src/unstable-core-do-not-import/rpc/codes.d.ts
78
+ /**
79
+ * JSON-RPC 2.0 Error codes
80
+ *
81
+ * `-32000` to `-32099` are reserved for implementation-defined server-errors.
82
+ * For tRPC we're copying the last digits of HTTP 4XX errors.
83
+ */
84
+ declare const TRPC_ERROR_CODES_BY_KEY: {
85
+ /**
86
+ * Invalid JSON was received by the server.
87
+ * An error occurred on the server while parsing the JSON text.
88
+ */
89
+ readonly PARSE_ERROR: -32700;
90
+ /**
91
+ * The JSON sent is not a valid Request object.
92
+ */
93
+ readonly BAD_REQUEST: -32600;
94
+ readonly INTERNAL_SERVER_ERROR: -32603;
95
+ readonly NOT_IMPLEMENTED: -32603;
96
+ readonly BAD_GATEWAY: -32603;
97
+ readonly SERVICE_UNAVAILABLE: -32603;
98
+ readonly GATEWAY_TIMEOUT: -32603;
99
+ readonly UNAUTHORIZED: -32001;
100
+ readonly PAYMENT_REQUIRED: -32002;
101
+ readonly FORBIDDEN: -32003;
102
+ readonly NOT_FOUND: -32004;
103
+ readonly METHOD_NOT_SUPPORTED: -32005;
104
+ readonly TIMEOUT: -32008;
105
+ readonly CONFLICT: -32009;
106
+ readonly PRECONDITION_FAILED: -32012;
107
+ readonly PAYLOAD_TOO_LARGE: -32013;
108
+ readonly UNSUPPORTED_MEDIA_TYPE: -32015;
109
+ readonly UNPROCESSABLE_CONTENT: -32022;
110
+ readonly PRECONDITION_REQUIRED: -32028;
111
+ readonly TOO_MANY_REQUESTS: -32029;
112
+ readonly CLIENT_CLOSED_REQUEST: -32099;
113
+ };
114
+ type TRPC_ERROR_CODE_NUMBER = ValueOf<typeof TRPC_ERROR_CODES_BY_KEY>;
115
+ type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;
116
+ /**
117
+ * tRPC error codes that are considered retryable
118
+ * With out of the box SSE, the client will reconnect when these errors are encountered
119
+ */
120
+ declare class TRPCError extends Error {
121
+ readonly cause?: Error;
122
+ readonly code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
123
+ constructor(opts: {
124
+ message?: string;
125
+ code: TRPC_ERROR_CODE_KEY;
126
+ cause?: unknown;
127
+ });
128
+ } //# sourceMappingURL=TRPCError.d.ts.map
129
+ //#endregion
130
+ //#region src/vendor/standard-schema-v1/spec.d.ts
131
+ /**
132
+ *
133
+ * @see https://github.com/standard-schema/standard-schema/blob/main/packages/spec/src/index.ts
134
+ */
135
+ /** The Standard Schema interface. */
136
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
137
+ /** The Standard Schema properties. */
138
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
139
+ }
140
+ declare namespace StandardSchemaV1 {
141
+ /** The Standard Schema properties interface. */
142
+ interface Props<Input = unknown, Output = Input> {
143
+ /** The version number of the standard. */
144
+ readonly version: 1;
145
+ /** The vendor name of the schema library. */
146
+ readonly vendor: string;
147
+ /** Validates unknown input values. */
148
+ readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
149
+ /** Inferred types associated with the schema. */
150
+ readonly types?: Types<Input, Output> | undefined;
151
+ }
152
+ /** The result interface of the validate function. */
153
+ type Result<Output> = SuccessResult<Output> | FailureResult;
154
+ /** The result interface if validation succeeds. */
155
+ interface SuccessResult<Output> {
156
+ /** The typed output value. */
157
+ readonly value: Output;
158
+ /** The non-existent issues. */
159
+ readonly issues?: undefined;
160
+ }
161
+ /** The result interface if validation fails. */
162
+ interface FailureResult {
163
+ /** The issues of failed validation. */
164
+ readonly issues: ReadonlyArray<Issue>;
165
+ }
166
+ /** The issue interface of the failure output. */
167
+ interface Issue {
168
+ /** The error message of the issue. */
169
+ readonly message: string;
170
+ /** The path of the issue, if any. */
171
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
172
+ }
173
+ /** The path segment interface of the issue. */
174
+ interface PathSegment {
175
+ /** The key representing a path segment. */
176
+ readonly key: PropertyKey;
177
+ }
178
+ /** The Standard Schema types interface. */
179
+ interface Types<Input = unknown, Output = Input> {
180
+ /** The input type of the schema. */
181
+ readonly input: Input;
182
+ /** The output type of the schema. */
183
+ readonly output: Output;
184
+ }
185
+ /** Infers the input type of a Standard Schema. */
186
+ type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
187
+ /** Infers the output type of a Standard Schema. */
188
+ type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
189
+ } //# sourceMappingURL=spec.d.ts.map
190
+ //#endregion
191
+ //#region src/unstable-core-do-not-import/parser.d.ts
192
+ type ParserZodEsque<TInput, TParsedInput> = {
193
+ _input: TInput;
194
+ _output: TParsedInput;
195
+ };
196
+ type ParserValibotEsque<TInput, TParsedInput> = {
197
+ schema: {
198
+ _types?: {
199
+ input: TInput;
200
+ output: TParsedInput;
201
+ };
202
+ };
203
+ };
204
+ type ParserArkTypeEsque<TInput, TParsedInput> = {
205
+ inferIn: TInput;
206
+ infer: TParsedInput;
207
+ };
208
+ type ParserStandardSchemaEsque<TInput, TParsedInput> = StandardSchemaV1<TInput, TParsedInput>;
209
+ type ParserMyZodEsque<TInput> = {
210
+ parse: (input: any) => TInput;
211
+ };
212
+ type ParserSuperstructEsque<TInput> = {
213
+ create: (input: unknown) => TInput;
214
+ };
215
+ type ParserCustomValidatorEsque<TInput> = (input: unknown) => Promise<TInput> | TInput;
216
+ type ParserYupEsque<TInput> = {
217
+ validateSync: (input: unknown) => TInput;
218
+ };
219
+ type ParserScaleEsque<TInput> = {
220
+ assert(value: unknown): asserts value is TInput;
221
+ };
222
+ type ParserWithoutInput<TInput> = ParserCustomValidatorEsque<TInput> | ParserMyZodEsque<TInput> | ParserScaleEsque<TInput> | ParserSuperstructEsque<TInput> | ParserYupEsque<TInput>;
223
+ type ParserWithInputOutput<TInput, TParsedInput> = ParserZodEsque<TInput, TParsedInput> | ParserValibotEsque<TInput, TParsedInput> | ParserArkTypeEsque<TInput, TParsedInput> | ParserStandardSchemaEsque<TInput, TParsedInput>;
224
+ type Parser = ParserWithInputOutput<any, any> | ParserWithoutInput<any>;
225
+ /**
226
+ * @internal
227
+ */
228
+ interface ProcedureCallOptions<TContext> {
229
+ ctx: TContext;
230
+ getRawInput: GetRawInputFn;
231
+ input?: unknown;
232
+ path: string;
233
+ type: ProcedureType;
234
+ signal: AbortSignal | undefined;
235
+ /**
236
+ * The index of this call in a batch request.
237
+ */
238
+ batchIndex: number;
239
+ } //#endregion
240
+ //#region src/unstable-core-do-not-import/procedure.d.ts
241
+ declare const procedureTypes: readonly ["query", "mutation", "subscription"];
242
+ /**
243
+ * @public
244
+ */
245
+ type ProcedureType = (typeof procedureTypes)[number];
246
+ interface BuiltProcedureDef {
247
+ meta: unknown;
248
+ input: unknown;
249
+ output: unknown;
250
+ }
251
+ /**
252
+ *
253
+ * @internal
254
+ */
255
+ interface Procedure<TType extends ProcedureType, TDef extends BuiltProcedureDef> {
256
+ _def: {
257
+ /**
258
+ * These are just types, they can't be used at runtime
259
+ * @internal
260
+ */
261
+ $types: {
262
+ input: TDef['input'];
263
+ output: TDef['output'];
264
+ };
265
+ procedure: true;
266
+ type: TType;
267
+ /**
268
+ * @internal
269
+ * Meta is not inferrable on individual procedures, only on the router
270
+ */
271
+ meta: unknown;
272
+ experimental_caller: boolean;
273
+ /**
274
+ * The input parsers for the procedure
275
+ */
276
+ inputs: Parser[];
277
+ };
278
+ meta: TDef['meta'];
279
+ /**
280
+ * @internal
281
+ */
282
+ (opts: ProcedureCallOptions<unknown>): Promise<TDef['output']>;
283
+ }
284
+ interface QueryProcedure<TDef extends BuiltProcedureDef> extends Procedure<'query', TDef> {}
285
+ interface MutationProcedure<TDef extends BuiltProcedureDef> extends Procedure<'mutation', TDef> {}
286
+ interface SubscriptionProcedure<TDef extends BuiltProcedureDef> extends Procedure<'subscription', TDef> {}
287
+ /**
288
+ * @deprecated
289
+ */
290
+ interface LegacyObservableSubscriptionProcedure<TDef extends BuiltProcedureDef> extends SubscriptionProcedure<TDef> {
291
+ _observable: true;
292
+ }
293
+ type AnyQueryProcedure = QueryProcedure<any>;
294
+ type AnyMutationProcedure = MutationProcedure<any>;
295
+ type AnySubscriptionProcedure = SubscriptionProcedure<any> | LegacyObservableSubscriptionProcedure<any>;
296
+ type AnyProcedure = AnyQueryProcedure | AnyMutationProcedure | AnySubscriptionProcedure;
297
+ type inferProcedureInput<TProcedure extends AnyProcedure> = undefined extends inferProcedureParams<TProcedure>['$types']['input'] ? void | inferProcedureParams<TProcedure>['$types']['input'] : inferProcedureParams<TProcedure>['$types']['input'];
298
+ type inferProcedureParams<TProcedure> = TProcedure extends AnyProcedure ? TProcedure['_def'] : never;
299
+ type inferProcedureOutput<TProcedure> = inferProcedureParams<TProcedure>['$types']['output'];
300
+ /**
301
+ * @internal
302
+ */
303
+ interface ErrorHandlerOptions<TContext> {
304
+ error: TRPCError;
305
+ type: ProcedureType | 'unknown';
306
+ path: string | undefined;
307
+ input: unknown;
308
+ ctx: TContext | undefined;
309
+ } //#endregion
310
+ //#region src/unstable-core-do-not-import/http/types.d.ts
311
+ /**
312
+ * @deprecated use `Headers` instead, this will be removed in v12
313
+ */
314
+ //#endregion
315
+ //#region src/unstable-core-do-not-import/rpc/envelopes.d.ts
316
+ /**
317
+ * Error response
318
+ */
319
+ interface TRPCErrorShape<TData extends object = object> {
320
+ code: TRPC_ERROR_CODE_NUMBER;
321
+ message: string;
322
+ data: TData;
323
+ }
324
+ /**
325
+ * JSON-RPC 2.0 Specification
326
+ */
327
+ declare namespace JSONRPC2 {
328
+ type RequestId = number | string | null;
329
+ /**
330
+ * All requests/responses extends this shape
331
+ */
332
+ interface BaseEnvelope {
333
+ id?: RequestId;
334
+ jsonrpc?: '2.0';
335
+ }
336
+ interface BaseRequest<TMethod extends string = string> extends BaseEnvelope {
337
+ method: TMethod;
338
+ }
339
+ interface Request<TMethod extends string = string, TParams = unknown> extends BaseRequest<TMethod> {
340
+ params: TParams;
341
+ }
342
+ interface ResultResponse<TResult = unknown> extends BaseEnvelope {
343
+ result: TResult;
344
+ }
345
+ interface ErrorResponse<TError extends TRPCErrorShape = TRPCErrorShape> extends BaseEnvelope {
346
+ error: TError;
347
+ }
348
+ }
349
+ interface TRPCResult<TData = unknown> {
350
+ data: TData;
351
+ type?: 'data';
352
+ /**
353
+ * The id of the message to keep track of in case of a reconnect
354
+ */
355
+ id?: string;
356
+ }
357
+ interface TRPCSuccessResponse<TData> extends JSONRPC2.ResultResponse<TRPCResult<TData>> {}
358
+ interface TRPCErrorResponse<TError extends TRPCErrorShape = TRPCErrorShape> extends JSONRPC2.ErrorResponse<TError> {}
359
+ interface TRPCResultMessage<TData> extends JSONRPC2.ResultResponse<{
360
+ type: 'started';
361
+ data?: never;
362
+ } | {
363
+ type: 'stopped';
364
+ data?: never;
365
+ } | TRPCResult<TData>> {}
366
+ //# sourceMappingURL=envelopes.d.ts.map
367
+ //#endregion
368
+ //#region src/unstable-core-do-not-import/transformer.d.ts
369
+ /**
370
+ * @public
371
+ */
372
+ interface DataTransformer {
373
+ serialize(object: any): any;
374
+ deserialize(object: any): any;
375
+ }
376
+ interface InputDataTransformer extends DataTransformer {
377
+ /**
378
+ * This function runs **on the client** before sending the data to the server.
379
+ */
380
+ serialize(object: any): any;
381
+ /**
382
+ * This function runs **on the server** to transform the data before it is passed to the resolver
383
+ */
384
+ deserialize(object: any): any;
385
+ }
386
+ interface OutputDataTransformer extends DataTransformer {
387
+ /**
388
+ * This function runs **on the server** before sending the data to the client.
389
+ */
390
+ serialize(object: any): any;
391
+ /**
392
+ * This function runs **only on the client** to transform the data sent from the server.
393
+ */
394
+ deserialize(object: any): any;
395
+ }
396
+ /**
397
+ * @public
398
+ */
399
+ interface CombinedDataTransformer {
400
+ /**
401
+ * Specify how the data sent from the client to the server should be transformed.
402
+ */
403
+ input: InputDataTransformer;
404
+ /**
405
+ * Specify how the data sent from the server to the client should be transformed.
406
+ */
407
+ output: OutputDataTransformer;
408
+ }
409
+ /**
410
+ * @public
411
+ */
412
+ /**
413
+ * @public
414
+ */
415
+ type DataTransformerOptions = CombinedDataTransformer | DataTransformer;
416
+ /**
417
+ * @internal
418
+ */
419
+ //# sourceMappingURL=parseTRPCMessage.d.ts.map
420
+ //#endregion
421
+ //#region src/unstable-core-do-not-import/error/formatter.d.ts
422
+ /**
423
+ * @internal
424
+ */
425
+ type ErrorFormatter<TContext, TShape extends TRPCErrorShape> = (opts: {
426
+ error: TRPCError;
427
+ type: ProcedureType | 'unknown';
428
+ path: string | undefined;
429
+ input: unknown;
430
+ ctx: TContext | undefined;
431
+ shape: DefaultErrorShape;
432
+ }) => TShape;
433
+ /**
434
+ * @internal
435
+ */
436
+ type DefaultErrorData = {
437
+ code: TRPC_ERROR_CODE_KEY;
438
+ httpStatus: number;
439
+ /**
440
+ * Path to the procedure that threw the error
441
+ */
442
+ path?: string;
443
+ /**
444
+ * Stack trace of the error (only in development)
445
+ */
446
+ stack?: string;
447
+ };
448
+ /**
449
+ * @internal
450
+ */
451
+ interface DefaultErrorShape extends TRPCErrorShape<DefaultErrorData> {
452
+ message: string;
453
+ code: TRPC_ERROR_CODE_NUMBER;
454
+ }
455
+ type Serialize$2 = (value: any) => any;
456
+ type PathArray = readonly (string | number)[];
457
+ type ProducerOnError = (opts: {
458
+ error: unknown;
459
+ path: PathArray;
460
+ }) => void;
461
+ interface JSONLProducerOptions {
462
+ serialize?: Serialize$2;
463
+ data: Record<string, unknown> | unknown[];
464
+ onError?: ProducerOnError;
465
+ formatError?: (opts: {
466
+ error: unknown;
467
+ path: PathArray;
468
+ }) => unknown;
469
+ maxDepth?: number;
470
+ /**
471
+ * Interval in milliseconds to send a ping to the client to keep the connection alive
472
+ * This will be sent as a whitespace character
473
+ * @default undefined
474
+ */
475
+ pingMs?: number;
476
+ }
477
+ /**
478
+ * JSON Lines stream producer
479
+ * @see https://jsonlines.org/
480
+ */
481
+ //# sourceMappingURL=sse.types.d.ts.map
482
+ //#endregion
483
+ //#region src/unstable-core-do-not-import/stream/sse.d.ts
484
+ type Serialize$1 = (value: any) => any;
485
+ /**
486
+ * @internal
487
+ */
488
+ interface SSEPingOptions {
489
+ /**
490
+ * Enable ping comments sent from the server
491
+ * @default false
492
+ */
493
+ enabled: boolean;
494
+ /**
495
+ * Interval in milliseconds
496
+ * @default 1000
497
+ */
498
+ intervalMs?: number;
499
+ }
500
+ interface SSEClientOptions {
501
+ /**
502
+ * Timeout and reconnect after inactivity in milliseconds
503
+ * @default undefined
504
+ */
505
+ reconnectAfterInactivityMs?: number;
506
+ }
507
+ interface SSEStreamProducerOptions<TValue = unknown> {
508
+ serialize?: Serialize$1;
509
+ data: AsyncIterable<TValue>;
510
+ maxDepth?: number;
511
+ ping?: SSEPingOptions;
512
+ /**
513
+ * Maximum duration in milliseconds for the request before ending the stream
514
+ * @default undefined
515
+ */
516
+ maxDurationMs?: number;
517
+ /**
518
+ * End the request immediately after data is sent
519
+ * Only useful for serverless runtimes that do not support streaming responses
520
+ * @default false
521
+ */
522
+ emitAndEndImmediately?: boolean;
523
+ formatError?: (opts: {
524
+ error: unknown;
525
+ }) => unknown;
526
+ /**
527
+ * Client-specific options - these will be sent to the client as part of the first message
528
+ * @default {}
529
+ */
530
+ client?: SSEClientOptions;
531
+ }
532
+ /**
533
+ *
534
+ * @see https://html.spec.whatwg.org/multipage/server-sent-events.html
535
+ */
536
+ //#endregion
537
+ //#region src/unstable-core-do-not-import/rootConfig.d.ts
538
+ /**
539
+ * The initial generics that are used in the init function
540
+ * @internal
541
+ */
542
+ interface RootTypes {
543
+ ctx: object;
544
+ meta: object;
545
+ errorShape: DefaultErrorShape;
546
+ transformer: boolean;
547
+ }
548
+ /**
549
+ * The default check to see if we're in a server
550
+ */
551
+ /**
552
+ * The tRPC root config
553
+ * @internal
554
+ */
555
+ interface RootConfig<TTypes extends RootTypes> {
556
+ /**
557
+ * The types that are used in the config
558
+ * @internal
559
+ */
560
+ $types: TTypes;
561
+ /**
562
+ * Use a data transformer
563
+ * @see https://trpc.io/docs/v11/data-transformers
564
+ */
565
+ transformer: CombinedDataTransformer;
566
+ /**
567
+ * Use custom error formatting
568
+ * @see https://trpc.io/docs/v11/error-formatting
569
+ */
570
+ errorFormatter: ErrorFormatter<TTypes['ctx'], TTypes['errorShape']>;
571
+ /**
572
+ * Allow `@trpc/server` to run in non-server environments
573
+ * @warning **Use with caution**, this should likely mainly be used within testing.
574
+ * @default false
575
+ */
576
+ allowOutsideOfServer: boolean;
577
+ /**
578
+ * Is this a server environment?
579
+ * @warning **Use with caution**, this should likely mainly be used within testing.
580
+ * @default typeof window === 'undefined' || 'Deno' in window || process.env.NODE_ENV === 'test'
581
+ */
582
+ isServer: boolean;
583
+ /**
584
+ * Is this development?
585
+ * Will be used to decide if the API should return stack traces
586
+ * @default process.env.NODE_ENV !== 'production'
587
+ */
588
+ isDev: boolean;
589
+ defaultMeta?: TTypes['meta'] extends object ? TTypes['meta'] : never;
590
+ /**
591
+ * Options for server-sent events (SSE) subscriptions
592
+ * @see https://trpc.io/docs/client/links/httpSubscriptionLink
593
+ */
594
+ sse?: {
595
+ /**
596
+ * Enable server-sent events (SSE) subscriptions
597
+ * @default true
598
+ */
599
+ enabled?: boolean;
600
+ } & Pick<SSEStreamProducerOptions, 'ping' | 'emitAndEndImmediately' | 'maxDurationMs' | 'client'>;
601
+ /**
602
+ * Options for batch stream
603
+ * @see https://trpc.io/docs/client/links/httpBatchStreamLink
604
+ */
605
+ jsonl?: Pick<JSONLProducerOptions, 'pingMs'>;
606
+ experimental?: {};
607
+ }
608
+ /**
609
+ * @internal
610
+ */
611
+ type CreateRootTypes<TGenerics extends RootTypes> = TGenerics;
612
+ type AnyRootTypes = CreateRootTypes<{
613
+ ctx: any;
614
+ meta: any;
615
+ errorShape: any;
616
+ transformer: any;
617
+ }>;
618
+ //#endregion
619
+ //#region src/unstable-core-do-not-import/router.d.ts
620
+ interface RouterRecord {
621
+ [key: string]: AnyProcedure | RouterRecord;
622
+ }
623
+ type DecorateProcedure<TProcedure extends AnyProcedure> = (input: inferProcedureInput<TProcedure>) => Promise<TProcedure['_def']['type'] extends 'subscription' ? TProcedure extends LegacyObservableSubscriptionProcedure<any> ? Observable<inferProcedureOutput<TProcedure>, TRPCError> : inferProcedureOutput<TProcedure> : inferProcedureOutput<TProcedure>>;
624
+ /**
625
+ * @internal
626
+ */
627
+ type DecorateRouterRecord<TRecord extends RouterRecord> = { [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyProcedure ? DecorateProcedure<$Value> : $Value extends RouterRecord ? DecorateRouterRecord<$Value> : never : never };
628
+ /**
629
+ * @internal
630
+ */
631
+ type RouterCallerErrorHandler<TContext> = (opts: ErrorHandlerOptions<TContext>) => void;
632
+ /**
633
+ * @internal
634
+ */
635
+ type RouterCaller<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = (
636
+ /**
637
+ * @note
638
+ * If passing a function, we recommend it's a cached function
639
+ * e.g. wrapped in `React.cache` to avoid unnecessary computations
640
+ */
641
+
642
+ ctx: TRoot['ctx'] | (() => MaybePromise<TRoot['ctx']>), options?: {
643
+ onError?: RouterCallerErrorHandler<TRoot['ctx']>;
644
+ signal?: AbortSignal;
645
+ }) => DecorateRouterRecord<TRecord>;
646
+ type Lazy<TAny> = (() => Promise<TAny>) & {};
647
+ type LazyLoader<TAny> = {
648
+ load: () => Promise<void>;
649
+ ref: Lazy<TAny>;
650
+ };
651
+ /**
652
+ * Lazy load a router
653
+ * @see https://trpc.io/docs/server/merging-routers#lazy-load
654
+ */
655
+ /**
656
+ * @internal
657
+ */
658
+ interface RouterDef<TRoot extends AnyRootTypes, TRecord extends RouterRecord> {
659
+ _config: RootConfig<TRoot>;
660
+ router: true;
661
+ procedure?: never;
662
+ procedures: TRecord;
663
+ record: TRecord;
664
+ lazy: Record<string, LazyLoader<AnyRouter>>;
665
+ }
666
+ interface Router<TRoot extends AnyRootTypes, TRecord extends RouterRecord> {
667
+ _def: RouterDef<TRoot, TRecord>;
668
+ /**
669
+ * @see https://trpc.io/docs/v11/server/server-side-calls
670
+ */
671
+ createCaller: RouterCaller<TRoot, TRecord>;
672
+ }
673
+ type BuiltRouter<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = Router<TRoot, TRecord> & TRecord;
674
+ type AnyRouter = Router<any, any>;
675
+ /** @internal */
676
+ type CreateRouterOptions = {
677
+ [key: string]: AnyProcedure | AnyRouter | CreateRouterOptions | Lazy<AnyRouter>;
678
+ };
679
+ /** @internal */
680
+ type DecorateCreateRouterOptions<TRouterOptions extends CreateRouterOptions> = { [K in keyof TRouterOptions]: TRouterOptions[K] extends infer $Value ? $Value extends AnyProcedure ? $Value : $Value extends Router<any, infer TRecord> ? TRecord : $Value extends Lazy<Router<any, infer TRecord>> ? TRecord : $Value extends CreateRouterOptions ? DecorateCreateRouterOptions<$Value> : never : never };
681
+ /**
682
+ * @internal
683
+ */
684
+ //#endregion
685
+ //#region src/unstable-core-do-not-import/clientish/inferrable.d.ts
686
+ type AnyClientTypes = Pick<AnyRootTypes, 'errorShape' | 'transformer'>;
687
+ /**
688
+ * Result of `initTRPC.create()`
689
+ */
690
+ type InitLike = {
691
+ _config: {
692
+ $types: AnyClientTypes;
693
+ };
694
+ };
695
+ /**
696
+ * Result of `initTRPC.create().router()`
697
+ */
698
+ type RouterLike = {
699
+ _def: InitLike;
700
+ };
701
+ /**
702
+ * Result of `initTRPC.create()._config`
703
+ */
704
+ type RootConfigLike = {
705
+ $types: AnyClientTypes;
706
+ };
707
+ /**
708
+ * Anything that can be inferred to the root config types needed for a TRPC client
709
+ */
710
+ type InferrableClientTypes = RouterLike | InitLike | RootConfigLike | AnyClientTypes;
711
+ type PickTypes<T extends AnyClientTypes> = {
712
+ transformer: T['transformer'];
713
+ errorShape: T['errorShape'];
714
+ };
715
+ /**
716
+ * Infer the root types from a InferrableClientTypes
717
+ */
718
+ type inferClientTypes<TInferrable extends InferrableClientTypes> = TInferrable extends AnyClientTypes ? PickTypes<TInferrable> : TInferrable extends RootConfigLike ? PickTypes<TInferrable['$types']> : TInferrable extends InitLike ? PickTypes<TInferrable['_config']['$types']> : TInferrable extends RouterLike ? PickTypes<TInferrable['_def']['_config']['$types']> : never; //#endregion
719
+ //#region src/unstable-core-do-not-import/clientish/serialize.d.ts
720
+ /**
721
+ * @see https://github.com/remix-run/remix/blob/2248669ed59fd716e267ea41df5d665d4781f4a9/packages/remix-server-runtime/serialize.ts
722
+ */
723
+ type JsonPrimitive = boolean | number | string | null;
724
+ type JsonArray = JsonValue[] | readonly JsonValue[];
725
+ type JsonObject = {
726
+ readonly [key: string | number]: JsonValue;
727
+ [key: symbol]: never;
728
+ };
729
+ type JsonValue = JsonPrimitive | JsonObject | JsonArray;
730
+ type IsJson<T> = T extends JsonValue ? true : false;
731
+ type NonJsonPrimitive = Function | symbol | undefined;
732
+ type IsAny<T> = 0 extends T & 1 ? true : false;
733
+ type JsonReturnable = JsonPrimitive | undefined;
734
+ type IsRecord<T extends object> = keyof WithoutIndexSignature<T> extends never ? true : false;
735
+ type Serialize<T> = IsAny<T> extends true ? any : unknown extends T ? unknown : IsJson<T> extends true ? T : T extends AsyncIterable<infer $T, infer $Return, infer $Next> ? AsyncIterable<Serialize<$T>, Serialize<$Return>, Serialize<$Next>> : T extends PromiseLike<infer $T> ? Promise<Serialize<$T>> : T extends JsonReturnable ? T : T extends Map<any, any> | Set<any> ? object : T extends NonJsonPrimitive ? never : T extends {
736
+ toJSON(): infer U;
737
+ } ? U : T extends [] ? [] : T extends [unknown, ...unknown[]] ? SerializeTuple<T> : T extends readonly (infer U)[] ? (U extends NonJsonPrimitive ? null : Serialize<U>)[] : T extends object ? IsRecord<T> extends true ? Record<keyof T, Serialize<T[keyof T]>> : Simplify<SerializeObject<UndefinedToOptional<T>>> : never;
738
+ /** JSON serialize [tuples](https://www.typescriptlang.org/docs/handbook/2/objects.html#tuple-types) */
739
+ type SerializeTuple<T extends [unknown, ...unknown[]]> = { [K in keyof T]: T[K] extends NonJsonPrimitive ? null : Serialize<T[K]> };
740
+ type SerializeObjectKey<T extends Record<any, any>, K> = K extends symbol ? never : IsAny<T[K]> extends true ? K : unknown extends T[K] ? K : T[K] extends NonJsonPrimitive ? never : K;
741
+ /**
742
+ * JSON serialize objects (not including arrays) and classes
743
+ * @internal
744
+ **/
745
+ type SerializeObject<T extends object> = { [K in keyof T as SerializeObjectKey<T, K>]: Serialize<T[K]> };
746
+ /**
747
+ * Extract keys from T where the value dosen't extend undefined
748
+ * Note: Can't parse IndexSignature or Record types
749
+ */
750
+ type FilterDefinedKeys<T extends object> = Exclude<{ [K in keyof T]: undefined extends T[K] ? never : K }[keyof T], undefined>;
751
+ /**
752
+ * Get value of exactOptionalPropertyTypes config
753
+ */
754
+ type ExactOptionalPropertyTypes = {
755
+ a?: 0 | undefined;
756
+ } extends {
757
+ a?: 0;
758
+ } ? false : true;
759
+ /**
760
+ * Check if T has an index signature
761
+ */
762
+ type HasIndexSignature<T extends object> = string extends keyof T ? true : false;
763
+ /**
764
+ * { [key: string]: number | undefined } --> { [key: string]: number }
765
+ */
766
+ type HandleIndexSignature<T extends object> = { [K in keyof Omit<T, keyof WithoutIndexSignature<T>>]: Exclude<T[K], undefined> };
767
+ /**
768
+ * { a: number | undefined } --> { a?: number }
769
+ * Note: Can't parse IndexSignature or Record types
770
+ */
771
+ type HandleUndefined<T extends object> = { [K in keyof Omit<T, FilterDefinedKeys<T>>]?: Exclude<T[K], undefined> };
772
+ /**
773
+ * Handle undefined, index signature and records
774
+ */
775
+ type UndefinedToOptional<T extends object> = Pick<WithoutIndexSignature<T>, FilterDefinedKeys<WithoutIndexSignature<T>>> & (ExactOptionalPropertyTypes extends true ? HandleIndexSignature<T> & HandleUndefined<WithoutIndexSignature<T>> : HasIndexSignature<T> extends true ? HandleIndexSignature<T> : HandleUndefined<T>); //#endregion
776
+ //#region src/unstable-core-do-not-import/clientish/inference.d.ts
777
+ /**
778
+ * @internal
779
+ */
780
+ type inferTransformedProcedureOutput<TInferrable extends InferrableClientTypes, TProcedure extends AnyProcedure> = inferClientTypes<TInferrable>['transformer'] extends false ? Serialize<inferProcedureOutput<TProcedure>> : inferProcedureOutput<TProcedure>;
781
+ /** @internal */
782
+ //#endregion
783
+ //#region src/server/index.d.ts
784
+ declare const appRouter: BuiltRouter<{
785
+ ctx: object;
786
+ meta: object;
787
+ errorShape: {
788
+ data: {
789
+ zodError: {
790
+ errors: string[];
791
+ } | null;
792
+ code: TRPC_ERROR_CODE_KEY;
793
+ httpStatus: number;
794
+ path?: string;
795
+ stack?: string;
796
+ };
797
+ message: string;
798
+ code: TRPC_ERROR_CODE_NUMBER;
799
+ };
800
+ transformer: true;
801
+ }, DecorateCreateRouterOptions<{
802
+ estimateSmartFee: QueryProcedure<{
803
+ input: {
804
+ requestId: string | null;
805
+ nblocks: number;
806
+ };
807
+ output: {
808
+ id: string | null;
809
+ error: {
810
+ message: string;
811
+ } | null;
812
+ result: {
813
+ feerate: number;
814
+ blocks: number;
815
+ };
816
+ };
817
+ meta: object;
818
+ }>;
819
+ getNetworkInfo: QueryProcedure<{
820
+ input: {
821
+ requestId: string | null;
822
+ };
823
+ output: {
824
+ id: string | null;
825
+ error: {
826
+ message: string;
827
+ } | null;
828
+ result: {
829
+ version: number;
830
+ subversion: string;
831
+ protocolversion: number;
832
+ localservices: string;
833
+ localrelay: boolean;
834
+ timeoffset: number;
835
+ networkactive: boolean;
836
+ connections: number;
837
+ networks: {
838
+ name: string;
839
+ limited: boolean;
840
+ reachable: boolean;
841
+ proxy: string;
842
+ proxy_randomize_credentials: boolean;
843
+ }[];
844
+ relayfee: number;
845
+ incrementalfee: number;
846
+ softdustlimit: number;
847
+ harddustlimit: number;
848
+ localaddresses: {
849
+ address: string;
850
+ port: number;
851
+ score: number;
852
+ }[];
853
+ warnings?: string | undefined;
854
+ };
855
+ };
856
+ meta: object;
857
+ }>;
858
+ getRawTransaction: QueryProcedure<{
859
+ input: {
860
+ requestId: string | null;
861
+ txid: string;
862
+ verbose?: boolean | undefined;
863
+ blockhash?: string | undefined;
864
+ };
865
+ output: {
866
+ id: string | null;
867
+ error: {
868
+ message: string;
869
+ } | null;
870
+ result: string | {
871
+ hex: string;
872
+ txid: string;
873
+ hash: string;
874
+ size: number;
875
+ vsize: number;
876
+ version: number;
877
+ locktime: number;
878
+ vin: {
879
+ txid?: string | undefined;
880
+ vout?: number | undefined;
881
+ scriptSig?: {
882
+ asm: string;
883
+ hex: string;
884
+ } | undefined;
885
+ sequence?: number | undefined;
886
+ }[];
887
+ vout: {
888
+ value: number;
889
+ n: number;
890
+ scriptPubKey: {
891
+ asm: string;
892
+ hex: string;
893
+ type: string;
894
+ addresses: string[];
895
+ reqSigs?: number | undefined;
896
+ };
897
+ }[];
898
+ blockhash?: string | undefined;
899
+ confirmations?: number | undefined;
900
+ time?: number | undefined;
901
+ blocktime?: number | undefined;
902
+ };
903
+ };
904
+ meta: object;
905
+ }>;
906
+ getBlockHash: QueryProcedure<{
907
+ input: {
908
+ requestId: string | null;
909
+ height: number;
910
+ };
911
+ output: {
912
+ id: string | null;
913
+ error: {
914
+ message: string;
915
+ } | null;
916
+ result: string;
917
+ };
918
+ meta: object;
919
+ }>;
920
+ getBlock: QueryProcedure<{
921
+ input: {
922
+ requestId: string | null;
923
+ blockhash: string;
924
+ verbosity?: number | undefined;
925
+ };
926
+ output: {
927
+ id: string | null;
928
+ error: {
929
+ message: string;
930
+ } | null;
931
+ result: string | {
932
+ hash: string;
933
+ confirmations: number;
934
+ size: number;
935
+ height: number;
936
+ version: number;
937
+ merkleroot: string;
938
+ tx: unknown[];
939
+ time: number;
940
+ nonce: number;
941
+ bits: string;
942
+ difficulty: number;
943
+ strippedsize?: number | undefined;
944
+ weight?: number | undefined;
945
+ versionHex?: string | undefined;
946
+ mediantime?: number | undefined;
947
+ chainwork?: string | undefined;
948
+ nTx?: number | undefined;
949
+ previousblockhash?: string | undefined;
950
+ nextblockhash?: string | undefined;
951
+ };
952
+ };
953
+ meta: object;
954
+ }>;
955
+ getBlockHeader: QueryProcedure<{
956
+ input: {
957
+ requestId: string | null;
958
+ blockhash: string;
959
+ verbose?: boolean | undefined;
960
+ };
961
+ output: {
962
+ id: string | null;
963
+ error: {
964
+ message: string;
965
+ } | null;
966
+ result: string | {
967
+ hash: string;
968
+ confirmations: number;
969
+ height: number;
970
+ version: number;
971
+ merkleroot: string;
972
+ time: number;
973
+ nonce: number;
974
+ bits: string;
975
+ difficulty: number;
976
+ versionHex?: string | undefined;
977
+ mediantime?: number | undefined;
978
+ chainwork?: string | undefined;
979
+ previousblockhash?: string | undefined;
980
+ nextblockhash?: string | undefined;
981
+ };
982
+ };
983
+ meta: object;
984
+ }>;
985
+ getTxOut: QueryProcedure<{
986
+ input: {
987
+ requestId: string | null;
988
+ txid: string;
989
+ n: number;
990
+ include_mempool?: boolean | undefined;
991
+ };
992
+ output: {
993
+ id: string | null;
994
+ error: {
995
+ message: string;
996
+ } | null;
997
+ result: {
998
+ bestblock: string;
999
+ confirmations: number;
1000
+ value: number;
1001
+ scriptPubKey: {
1002
+ asm: string;
1003
+ hex: string;
1004
+ type: string;
1005
+ reqSigs?: number | undefined;
1006
+ addresses?: string[] | undefined;
1007
+ };
1008
+ coinbase: boolean;
1009
+ } | null;
1010
+ };
1011
+ meta: object;
1012
+ }>;
1013
+ getChainTips: QueryProcedure<{
1014
+ input: {
1015
+ requestId: string | null;
1016
+ };
1017
+ output: {
1018
+ id: string | null;
1019
+ error: {
1020
+ message: string;
1021
+ } | null;
1022
+ result: {
1023
+ height: number;
1024
+ hash: string;
1025
+ branchlen: number;
1026
+ status: string;
1027
+ }[];
1028
+ };
1029
+ meta: object;
1030
+ }>;
1031
+ getRawMempool: QueryProcedure<{
1032
+ input: {
1033
+ requestId: string | null;
1034
+ verbose?: boolean | undefined;
1035
+ mempool_sequence?: boolean | undefined;
1036
+ };
1037
+ output: {
1038
+ id: string | null;
1039
+ error: {
1040
+ message: string;
1041
+ } | null;
1042
+ result: string[] | Record<string, {
1043
+ vsize: number;
1044
+ time: number;
1045
+ height: number;
1046
+ descendantcount: number;
1047
+ descendantsize: number;
1048
+ ancestorcount: number;
1049
+ ancestorsize: number;
1050
+ depends: string[];
1051
+ weight?: number | undefined;
1052
+ fee?: number | undefined;
1053
+ modifiedfee?: number | undefined;
1054
+ descendantfees?: number | undefined;
1055
+ ancestorfees?: number | undefined;
1056
+ wtxid?: string | undefined;
1057
+ fees?: {
1058
+ base: number;
1059
+ modified: number;
1060
+ ancestor: number;
1061
+ descendant: number;
1062
+ } | undefined;
1063
+ spentby?: string[] | undefined;
1064
+ "bip125-replaceable"?: boolean | undefined;
1065
+ unbroadcast?: boolean | undefined;
1066
+ }> | {
1067
+ txids: string[];
1068
+ mempool_sequence: number;
1069
+ };
1070
+ };
1071
+ meta: object;
1072
+ }>;
1073
+ getMempoolEntry: QueryProcedure<{
1074
+ input: {
1075
+ requestId: string | null;
1076
+ txid: string;
1077
+ };
1078
+ output: Record<string, unknown> | {
1079
+ id: string | number | null;
1080
+ error: {
1081
+ message: string;
1082
+ code?: number | undefined;
1083
+ } | null;
1084
+ result: Record<string, unknown> | null;
1085
+ };
1086
+ meta: object;
1087
+ }>;
1088
+ getMempoolAncestors: QueryProcedure<{
1089
+ input: {
1090
+ requestId: string | null;
1091
+ txid: string;
1092
+ verbose?: boolean | undefined;
1093
+ };
1094
+ output: {
1095
+ id: string | null;
1096
+ error: {
1097
+ message: string;
1098
+ } | null;
1099
+ result: string[] | Record<string, Record<string, unknown>>;
1100
+ };
1101
+ meta: object;
1102
+ }>;
1103
+ getMempoolDescendants: QueryProcedure<{
1104
+ input: {
1105
+ requestId: string | null;
1106
+ txid: string;
1107
+ verbose?: boolean | undefined;
1108
+ };
1109
+ output: {
1110
+ id: string | null;
1111
+ error: {
1112
+ message: string;
1113
+ } | null;
1114
+ result: string[] | Record<string, Record<string, unknown>>;
1115
+ };
1116
+ meta: object;
1117
+ }>;
1118
+ getMempoolInfo: QueryProcedure<{
1119
+ input: {
1120
+ requestId: string | null;
1121
+ };
1122
+ output: {
1123
+ id: string | null;
1124
+ error: {
1125
+ message: string;
1126
+ } | null;
1127
+ result: {
1128
+ size: number;
1129
+ bytes: number;
1130
+ usage: number;
1131
+ loaded?: boolean | undefined;
1132
+ maxmempool?: number | undefined;
1133
+ mempoolminfee?: number | undefined;
1134
+ minrelaytxfee?: number | undefined;
1135
+ unbroadcastcount?: number | undefined;
1136
+ };
1137
+ };
1138
+ meta: object;
1139
+ }>;
1140
+ getBestBlockHash: QueryProcedure<{
1141
+ input: {
1142
+ requestId: string | null;
1143
+ };
1144
+ output: {
1145
+ id: string | null;
1146
+ error: {
1147
+ message: string;
1148
+ } | null;
1149
+ result: string;
1150
+ };
1151
+ meta: object;
1152
+ }>;
1153
+ getBlockCount: QueryProcedure<{
1154
+ input: {
1155
+ requestId: string | null;
1156
+ };
1157
+ output: {
1158
+ id: string | null;
1159
+ error: {
1160
+ message: string;
1161
+ } | null;
1162
+ result: number;
1163
+ };
1164
+ meta: object;
1165
+ }>;
1166
+ getDifficulty: QueryProcedure<{
1167
+ input: {
1168
+ requestId: string | null;
1169
+ };
1170
+ output: {
1171
+ id: string | null;
1172
+ error: {
1173
+ message: string;
1174
+ } | null;
1175
+ result: number;
1176
+ };
1177
+ meta: object;
1178
+ }>;
1179
+ getNetworkHashPs: QueryProcedure<{
1180
+ input: {
1181
+ requestId: string | null;
1182
+ nblocks?: number | undefined;
1183
+ height?: number | undefined;
1184
+ };
1185
+ output: {
1186
+ id: string | null;
1187
+ error: {
1188
+ message: string;
1189
+ } | null;
1190
+ result: number;
1191
+ };
1192
+ meta: object;
1193
+ }>;
1194
+ getBlockchainInfo: QueryProcedure<{
1195
+ input: {
1196
+ requestId: string | null;
1197
+ };
1198
+ output: {
1199
+ id: string | null;
1200
+ error: {
1201
+ message: string;
1202
+ } | null;
1203
+ result: {
1204
+ chain: string;
1205
+ blocks: number;
1206
+ headers: number;
1207
+ bestblockhash: string;
1208
+ difficulty: number;
1209
+ mediantime: number;
1210
+ verificationprogress: number;
1211
+ initialblockdownload: boolean;
1212
+ chainwork: string;
1213
+ size_on_disk: number;
1214
+ pruned: boolean;
1215
+ pruneheight?: number | undefined;
1216
+ automatic_pruning?: boolean | undefined;
1217
+ prune_target_size?: number | undefined;
1218
+ softforks?: Record<string, unknown> | unknown[] | undefined;
1219
+ bip9_softforks?: Record<string, unknown> | undefined;
1220
+ warnings?: string | undefined;
1221
+ };
1222
+ };
1223
+ meta: object;
1224
+ }>;
1225
+ listUnspent: QueryProcedure<{
1226
+ input: {
1227
+ requestId: string | null;
1228
+ minconf?: number | undefined;
1229
+ maxconf?: number | undefined;
1230
+ addresses?: string[] | undefined;
1231
+ include_unsafe?: boolean | undefined;
1232
+ query_options?: {
1233
+ minimumAmount?: number | undefined;
1234
+ maximumAmount?: number | undefined;
1235
+ maximumCount?: number | undefined;
1236
+ minimumSumAmount?: number | undefined;
1237
+ } | undefined;
1238
+ };
1239
+ output: {
1240
+ id: string | null;
1241
+ error: {
1242
+ message: string;
1243
+ } | null;
1244
+ result: {
1245
+ txid: string;
1246
+ vout: number;
1247
+ scriptPubKey: string;
1248
+ amount: number;
1249
+ confirmations: number;
1250
+ spendable: boolean;
1251
+ solvable: boolean;
1252
+ address?: string | undefined;
1253
+ account?: string | undefined;
1254
+ redeemScript?: string | undefined;
1255
+ safe?: boolean | undefined;
1256
+ }[];
1257
+ };
1258
+ meta: object;
1259
+ }>;
1260
+ getTxOutProof: QueryProcedure<{
1261
+ input: {
1262
+ requestId: string | null;
1263
+ txids: string[];
1264
+ blockhash?: string | undefined;
1265
+ };
1266
+ output: {
1267
+ id: string | null;
1268
+ error: {
1269
+ message: string;
1270
+ } | null;
1271
+ result: string;
1272
+ };
1273
+ meta: object;
1274
+ }>;
1275
+ verifyTxOutProof: QueryProcedure<{
1276
+ input: {
1277
+ requestId: string | null;
1278
+ proof: string;
1279
+ };
1280
+ output: {
1281
+ id: string | null;
1282
+ error: {
1283
+ message: string;
1284
+ } | null;
1285
+ result: string[];
1286
+ };
1287
+ meta: object;
1288
+ }>;
1289
+ validateAddress: QueryProcedure<{
1290
+ input: {
1291
+ requestId: string | null;
1292
+ address: string;
1293
+ };
1294
+ output: {
1295
+ id: string | null;
1296
+ error: {
1297
+ message: string;
1298
+ } | null;
1299
+ result: {
1300
+ isvalid: boolean;
1301
+ address?: string | undefined;
1302
+ scriptPubKey?: string | undefined;
1303
+ isscript?: boolean | undefined;
1304
+ iswitness?: boolean | undefined;
1305
+ witness_version?: number | undefined;
1306
+ witness_program?: string | undefined;
1307
+ };
1308
+ };
1309
+ meta: object;
1310
+ }>;
1311
+ ping: QueryProcedure<{
1312
+ input: {
1313
+ requestId: string | null;
1314
+ };
1315
+ output: {
1316
+ id: string | null;
1317
+ error: {
1318
+ message: string;
1319
+ } | null;
1320
+ result: null;
1321
+ };
1322
+ meta: object;
1323
+ }>;
1324
+ sendRawTransaction: MutationProcedure<{
1325
+ input: {
1326
+ requestId: string | null;
1327
+ hexstring: string;
1328
+ maxfeerate?: string | number | undefined;
1329
+ };
1330
+ output: {
1331
+ id: string | null;
1332
+ error: {
1333
+ message: string;
1334
+ } | null;
1335
+ result: string;
1336
+ };
1337
+ meta: object;
1338
+ }>;
1339
+ health: QueryProcedure<{
1340
+ input: void;
1341
+ output: {
1342
+ status: string;
1343
+ message: string;
1344
+ };
1345
+ meta: object;
1346
+ }>;
1347
+ }>>;
1348
+ type AppRouter = typeof appRouter;
1349
+ //#endregion
1350
+ export { inferClientTypes as C, Unsubscribable as D, Observable as E, inferAsyncIterableYield as S, inferTransformedProcedureOutput as T, TRPCResultMessage as _, AnyRouter as a, TRPC_ERROR_CODE_NUMBER as b, DecorateCreateRouterOptions as c, Maybe as d, MutationProcedure as f, TRPCErrorResponse as g, RouterRecord as h, AnyProcedure as i, DefaultErrorShape as l, QueryProcedure as m, appRouter as n, BuiltRouter as o, ProcedureType as p, AnyClientTypes as r, DataTransformerOptions as s, AppRouter as t, InferrableClientTypes as u, TRPCSuccessResponse as v, inferProcedureInput as w, TypeError as x, TRPC_ERROR_CODE_KEY as y };