dogecoin-core-trpc-api 0.0.2 → 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.
- package/dist/client/index.cjs +1 -6
- package/dist/client/index.d.cts +897 -389
- package/dist/client/index.d.mts +907 -0
- package/dist/client/index.mjs +1 -0
- package/dist/dist-CoGVt-el.mjs +1 -0
- package/dist/dist-DSfWW6j5.cjs +1 -0
- package/dist/index-xhjl7-E2.d.cts +1350 -0
- package/dist/index-xhjl7-E2.d.mts +1350 -0
- package/dist/index.cjs +10 -66
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +11 -0
- package/dist/observable-UMO3vUa_-B-4YfzrW.cjs +1 -0
- package/dist/observable-UMO3vUa_-Dwnf6c9J.mjs +1 -0
- package/dist/server/index.cjs +1 -48
- package/dist/server/index.d.cts +2 -391
- package/dist/server/index.d.mts +2 -0
- package/dist/server/index.mjs +1 -0
- package/dist/server-eN_gv1vU.cjs +68 -0
- package/dist/server-rKQeb1mJ.mjs +68 -0
- package/package.json +14 -14
- package/dist/chunk-CBF5LCPH.js +0 -45
- package/dist/chunk-OP2QDE6K.js +0 -4
- package/dist/chunk-Z4KAWBXZ.js +0 -22
- package/dist/client/index.d.ts +0 -399
- package/dist/client/index.js +0 -6
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -1
- package/dist/server/index.d.ts +0 -391
- package/dist/server/index.js +0 -1
|
@@ -0,0 +1,907 @@
|
|
|
1
|
+
import { C as inferClientTypes, D as Unsubscribable, E as Observable, S as inferAsyncIterableYield, T as inferTransformedProcedureOutput, _ as TRPCResultMessage, a as AnyRouter, b as TRPC_ERROR_CODE_NUMBER, c as DecorateCreateRouterOptions, d as Maybe, f as MutationProcedure, g as TRPCErrorResponse, h as RouterRecord, i as AnyProcedure, l as DefaultErrorShape, m as QueryProcedure, o as BuiltRouter, p as ProcedureType, r as AnyClientTypes, s as DataTransformerOptions, t as AppRouter, u as InferrableClientTypes, v as TRPCSuccessResponse, w as inferProcedureInput, x as TypeError, y as TRPC_ERROR_CODE_KEY } from "../index-xhjl7-E2.mjs";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/@trpc/client/dist/subscriptions.d-Dlr1nWGD.d.mts
|
|
4
|
+
//#region src/links/internals/subscriptions.d.ts
|
|
5
|
+
interface ConnectionStateBase<TError> {
|
|
6
|
+
type: 'state';
|
|
7
|
+
data?: never;
|
|
8
|
+
error: TError | null;
|
|
9
|
+
}
|
|
10
|
+
interface ConnectionIdleState extends ConnectionStateBase<null> {
|
|
11
|
+
state: 'idle';
|
|
12
|
+
}
|
|
13
|
+
interface ConnectionConnectingState<TError> extends ConnectionStateBase<TError | null> {
|
|
14
|
+
state: 'connecting';
|
|
15
|
+
}
|
|
16
|
+
interface ConnectionPendingState extends ConnectionStateBase<null> {
|
|
17
|
+
state: 'pending';
|
|
18
|
+
}
|
|
19
|
+
type TRPCConnectionState<TError> = ConnectionIdleState | ConnectionConnectingState<TError> | ConnectionPendingState; //#endregion
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region node_modules/@trpc/client/dist/types.d-sRNtuQA-.d.mts
|
|
22
|
+
//#region src/internals/types.d.ts
|
|
23
|
+
/**
|
|
24
|
+
* A subset of the standard fetch function type needed by tRPC internally.
|
|
25
|
+
* @see fetch from lib.dom.d.ts
|
|
26
|
+
* @remarks
|
|
27
|
+
* If you need a property that you know exists but doesn't exist on this
|
|
28
|
+
* interface, go ahead and add it.
|
|
29
|
+
*/
|
|
30
|
+
type FetchEsque = (input: RequestInfo | URL | string, init?: RequestInit | RequestInitEsque) => Promise<ResponseEsque>;
|
|
31
|
+
/**
|
|
32
|
+
* A simpler version of the native fetch function's type for packages with
|
|
33
|
+
* their own fetch types, such as undici and node-fetch.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* A subset of the standard RequestInit properties needed by tRPC internally.
|
|
37
|
+
* @see RequestInit from lib.dom.d.ts
|
|
38
|
+
* @remarks
|
|
39
|
+
* If you need a property that you know exists but doesn't exist on this
|
|
40
|
+
* interface, go ahead and add it.
|
|
41
|
+
*/
|
|
42
|
+
interface RequestInitEsque {
|
|
43
|
+
/**
|
|
44
|
+
* Sets the request's body.
|
|
45
|
+
*/
|
|
46
|
+
body?: FormData | string | null | Uint8Array<ArrayBuffer> | Blob | File;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the request's associated headers.
|
|
49
|
+
*/
|
|
50
|
+
headers?: [string, string][] | Record<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* The request's HTTP-style method.
|
|
53
|
+
*/
|
|
54
|
+
method?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the request's signal.
|
|
57
|
+
*/
|
|
58
|
+
signal?: AbortSignal | undefined;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A subset of the standard ReadableStream properties needed by tRPC internally.
|
|
62
|
+
* @see ReadableStream from lib.dom.d.ts
|
|
63
|
+
*/
|
|
64
|
+
type WebReadableStreamEsque = {
|
|
65
|
+
getReader: () => ReadableStreamDefaultReader<Uint8Array>;
|
|
66
|
+
};
|
|
67
|
+
type NodeJSReadableStreamEsque = {
|
|
68
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): NodeJSReadableStreamEsque;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* A subset of the standard Response properties needed by tRPC internally.
|
|
72
|
+
* @see Response from lib.dom.d.ts
|
|
73
|
+
*/
|
|
74
|
+
interface ResponseEsque {
|
|
75
|
+
readonly ok: boolean;
|
|
76
|
+
readonly body?: NodeJSReadableStreamEsque | WebReadableStreamEsque | null;
|
|
77
|
+
/**
|
|
78
|
+
* @remarks
|
|
79
|
+
* The built-in Response::json() method returns Promise<any>, but
|
|
80
|
+
* that's not as type-safe as unknown. We use unknown because we're
|
|
81
|
+
* more type-safe. You do want more type safety, right? 😉
|
|
82
|
+
*/
|
|
83
|
+
json(): Promise<unknown>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
type NonEmptyArray<TItem> = [TItem, ...TItem[]];
|
|
89
|
+
type ClientContext = Record<string, unknown>;
|
|
90
|
+
/**
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
interface TRPCProcedureOptions {
|
|
94
|
+
/**
|
|
95
|
+
* Client-side context
|
|
96
|
+
*/
|
|
97
|
+
context?: ClientContext;
|
|
98
|
+
signal?: AbortSignal;
|
|
99
|
+
} //#endregion
|
|
100
|
+
//#region src/TRPCClientError.d.ts
|
|
101
|
+
type inferErrorShape<TInferrable extends InferrableClientTypes> = inferClientTypes<TInferrable>['errorShape'];
|
|
102
|
+
interface TRPCClientErrorBase<TShape extends DefaultErrorShape> {
|
|
103
|
+
readonly message: string;
|
|
104
|
+
readonly shape: Maybe<TShape>;
|
|
105
|
+
readonly data: Maybe<TShape['data']>;
|
|
106
|
+
}
|
|
107
|
+
declare class TRPCClientError<TRouterOrProcedure extends InferrableClientTypes> extends Error implements TRPCClientErrorBase<inferErrorShape<TRouterOrProcedure>> {
|
|
108
|
+
readonly cause: Error | undefined;
|
|
109
|
+
readonly shape: Maybe<inferErrorShape<TRouterOrProcedure>>;
|
|
110
|
+
readonly data: Maybe<inferErrorShape<TRouterOrProcedure>['data']>;
|
|
111
|
+
/**
|
|
112
|
+
* Additional meta data about the error
|
|
113
|
+
* In the case of HTTP-errors, we'll have `response` and potentially `responseJSON` here
|
|
114
|
+
*/
|
|
115
|
+
meta: Record<string, unknown> | undefined;
|
|
116
|
+
constructor(message: string, opts?: {
|
|
117
|
+
result?: Maybe<TRPCErrorResponse<inferErrorShape<TRouterOrProcedure>>>;
|
|
118
|
+
cause?: Error;
|
|
119
|
+
meta?: Record<string, unknown>;
|
|
120
|
+
});
|
|
121
|
+
static from<TRouterOrProcedure extends InferrableClientTypes>(_cause: Error | TRPCErrorResponse<any> | object, opts?: {
|
|
122
|
+
meta?: Record<string, unknown>;
|
|
123
|
+
cause?: Error;
|
|
124
|
+
}): TRPCClientError<TRouterOrProcedure>;
|
|
125
|
+
} //#endregion
|
|
126
|
+
//#region src/links/internals/contentTypes.d.ts
|
|
127
|
+
//# sourceMappingURL=contentTypes.d.ts.map
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/links/types.d.ts
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
interface OperationContext extends Record<string, unknown> {}
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
type Operation<TInput = unknown> = {
|
|
138
|
+
id: number;
|
|
139
|
+
type: 'mutation' | 'query' | 'subscription';
|
|
140
|
+
input: TInput;
|
|
141
|
+
path: string;
|
|
142
|
+
context: OperationContext;
|
|
143
|
+
signal: Maybe<AbortSignal>;
|
|
144
|
+
};
|
|
145
|
+
interface HeadersInitEsque {
|
|
146
|
+
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
151
|
+
type HTTPHeaders = HeadersInitEsque | Record<string, string[] | string | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* The default `fetch` implementation has an overloaded signature. By convention this library
|
|
154
|
+
* only uses the overload taking a string and options object.
|
|
155
|
+
*/
|
|
156
|
+
interface TRPCClientRuntime {}
|
|
157
|
+
/**
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
160
|
+
interface OperationResultEnvelope<TOutput, TError> {
|
|
161
|
+
result: TRPCResultMessage<TOutput>['result'] | TRPCSuccessResponse<TOutput>['result'] | TRPCConnectionState<TError>;
|
|
162
|
+
context?: OperationContext;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
type OperationResultObservable<TInferrable extends InferrableClientTypes, TOutput> = Observable<OperationResultEnvelope<TOutput, TRPCClientError<TInferrable>>, TRPCClientError<TInferrable>>;
|
|
168
|
+
/**
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
/**
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
type OperationLink<TInferrable extends InferrableClientTypes, TInput = unknown, TOutput = unknown> = (opts: {
|
|
175
|
+
op: Operation<TInput>;
|
|
176
|
+
next: (op: Operation<TInput>) => OperationResultObservable<TInferrable, TOutput>;
|
|
177
|
+
}) => OperationResultObservable<TInferrable, TOutput>;
|
|
178
|
+
/**
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
type TRPCLink<TInferrable extends InferrableClientTypes> = (opts: TRPCClientRuntime) => OperationLink<TInferrable>; //# sourceMappingURL=types.d.ts.map
|
|
182
|
+
//#endregion
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region node_modules/@trpc/client/dist/unstable-internals.d-BOmV7EK1.d.mts
|
|
185
|
+
type TransformerOptionYes = {
|
|
186
|
+
/**
|
|
187
|
+
* Data transformer
|
|
188
|
+
*
|
|
189
|
+
* You must use the same transformer on the backend and frontend
|
|
190
|
+
* @see https://trpc.io/docs/v11/data-transformers
|
|
191
|
+
**/
|
|
192
|
+
transformer: DataTransformerOptions;
|
|
193
|
+
};
|
|
194
|
+
type TransformerOptionNo = {
|
|
195
|
+
/**
|
|
196
|
+
* Data transformer
|
|
197
|
+
*
|
|
198
|
+
* You must use the same transformer on the backend and frontend
|
|
199
|
+
* @see https://trpc.io/docs/v11/data-transformers
|
|
200
|
+
**/
|
|
201
|
+
transformer?: TypeError<'You must define a transformer on your your `initTRPC`-object first'>;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
|
+
type TransformerOptions<TRoot extends Pick<AnyClientTypes, 'transformer'>> = TRoot['transformer'] extends true ? TransformerOptionYes : TransformerOptionNo;
|
|
207
|
+
/**
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
210
|
+
/**
|
|
211
|
+
* @internal
|
|
212
|
+
*/
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region node_modules/@trpc/client/dist/httpUtils.d-yYSKGhiS.d.mts
|
|
215
|
+
//#region src/links/internals/httpUtils.d.ts
|
|
216
|
+
/**
|
|
217
|
+
* @internal
|
|
218
|
+
*/
|
|
219
|
+
type HTTPLinkBaseOptions<TRoot extends Pick<AnyClientTypes, 'transformer'>> = {
|
|
220
|
+
url: string | URL;
|
|
221
|
+
/**
|
|
222
|
+
* Add ponyfill for fetch
|
|
223
|
+
*/
|
|
224
|
+
fetch?: FetchEsque;
|
|
225
|
+
/**
|
|
226
|
+
* Send all requests `as POST`s requests regardless of the procedure type
|
|
227
|
+
* The HTTP handler must separately allow overriding the method. See:
|
|
228
|
+
* @see https://trpc.io/docs/rpc
|
|
229
|
+
*/
|
|
230
|
+
methodOverride?: 'POST';
|
|
231
|
+
} & TransformerOptions<TRoot>; //#endregion
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region node_modules/@trpc/client/dist/httpBatchLink.d-B6vCg-F-.d.mts
|
|
234
|
+
//#region src/links/HTTPBatchLinkOptions.d.ts
|
|
235
|
+
type HTTPBatchLinkOptions<TRoot extends AnyClientTypes> = HTTPLinkBaseOptions<TRoot> & {
|
|
236
|
+
maxURLLength?: number;
|
|
237
|
+
/**
|
|
238
|
+
* Headers to be set on outgoing requests or a callback that of said headers
|
|
239
|
+
* @see http://trpc.io/docs/client/headers
|
|
240
|
+
*/
|
|
241
|
+
headers?: HTTPHeaders | ((opts: {
|
|
242
|
+
opList: NonEmptyArray<Operation>;
|
|
243
|
+
}) => HTTPHeaders | Promise<HTTPHeaders>);
|
|
244
|
+
/**
|
|
245
|
+
* Maximum number of calls in a single batch request
|
|
246
|
+
* @default Infinity
|
|
247
|
+
*/
|
|
248
|
+
maxItems?: number;
|
|
249
|
+
}; //# sourceMappingURL=HTTPBatchLinkOptions.d.ts.map
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/links/httpBatchLink.d.ts
|
|
252
|
+
/**
|
|
253
|
+
* @see https://trpc.io/docs/client/links/httpBatchLink
|
|
254
|
+
*/
|
|
255
|
+
declare function httpBatchLink<TRouter extends AnyRouter>(opts: HTTPBatchLinkOptions<TRouter['_def']['_config']['$types']>): TRPCLink<TRouter>; //# sourceMappingURL=httpBatchLink.d.ts.map
|
|
256
|
+
//#endregion
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region node_modules/@trpc/client/dist/index.d.mts
|
|
259
|
+
//#region src/internals/TRPCUntypedClient.d.ts
|
|
260
|
+
interface TRPCRequestOptions {
|
|
261
|
+
/**
|
|
262
|
+
* Pass additional context to links
|
|
263
|
+
*/
|
|
264
|
+
context?: OperationContext;
|
|
265
|
+
signal?: AbortSignal;
|
|
266
|
+
}
|
|
267
|
+
interface TRPCSubscriptionObserver<TValue, TError> {
|
|
268
|
+
onStarted: (opts: {
|
|
269
|
+
context: OperationContext | undefined;
|
|
270
|
+
}) => void;
|
|
271
|
+
onData: (value: inferAsyncIterableYield<TValue>) => void;
|
|
272
|
+
onError: (err: TError) => void;
|
|
273
|
+
onStopped: () => void;
|
|
274
|
+
onComplete: () => void;
|
|
275
|
+
onConnectionStateChange: (state: TRPCConnectionState<TError>) => void;
|
|
276
|
+
}
|
|
277
|
+
/** @internal */
|
|
278
|
+
type CreateTRPCClientOptions<TRouter extends InferrableClientTypes> = {
|
|
279
|
+
links: TRPCLink<TRouter>[];
|
|
280
|
+
transformer?: TypeError<'The transformer property has moved to httpLink/httpBatchLink/wsLink'>;
|
|
281
|
+
};
|
|
282
|
+
declare class TRPCUntypedClient<TInferrable extends InferrableClientTypes> {
|
|
283
|
+
private readonly links;
|
|
284
|
+
readonly runtime: TRPCClientRuntime;
|
|
285
|
+
private requestId;
|
|
286
|
+
constructor(opts: CreateTRPCClientOptions<TInferrable>);
|
|
287
|
+
private $request;
|
|
288
|
+
private requestAsPromise;
|
|
289
|
+
query(path: string, input?: unknown, opts?: TRPCRequestOptions): Promise<unknown>;
|
|
290
|
+
mutation(path: string, input?: unknown, opts?: TRPCRequestOptions): Promise<unknown>;
|
|
291
|
+
subscription(path: string, input: unknown, opts: Partial<TRPCSubscriptionObserver<unknown, TRPCClientError<AnyRouter>>> & TRPCRequestOptions): Unsubscribable;
|
|
292
|
+
} //# sourceMappingURL=TRPCUntypedClient.d.ts.map
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/createTRPCUntypedClient.d.ts
|
|
295
|
+
declare const untypedClientSymbol: unique symbol;
|
|
296
|
+
/**
|
|
297
|
+
* @public
|
|
298
|
+
**/
|
|
299
|
+
type TRPCClient<TRouter extends AnyRouter> = DecoratedProcedureRecord<{
|
|
300
|
+
transformer: TRouter['_def']['_config']['$types']['transformer'];
|
|
301
|
+
errorShape: TRouter['_def']['_config']['$types']['errorShape'];
|
|
302
|
+
}, TRouter['_def']['record']> & {
|
|
303
|
+
[untypedClientSymbol]: TRPCUntypedClient<TRouter>;
|
|
304
|
+
};
|
|
305
|
+
/** @internal */
|
|
306
|
+
type TRPCResolverDef = {
|
|
307
|
+
input: any;
|
|
308
|
+
output: any;
|
|
309
|
+
transformer: boolean;
|
|
310
|
+
errorShape: any;
|
|
311
|
+
};
|
|
312
|
+
type coerceAsyncGeneratorToIterable<T> = T extends AsyncGenerator<infer $T, infer $Return, infer $Next> ? AsyncIterable<$T, $Return, $Next> : T;
|
|
313
|
+
/** @internal */
|
|
314
|
+
type Resolver<TDef extends TRPCResolverDef> = (input: TDef['input'], opts?: TRPCProcedureOptions) => Promise<coerceAsyncGeneratorToIterable<TDef['output']>>;
|
|
315
|
+
/** @internal */
|
|
316
|
+
type SubscriptionResolver<TDef extends TRPCResolverDef> = (input: TDef['input'], opts: Partial<TRPCSubscriptionObserver<TDef['output'], TRPCClientError<TDef>>> & TRPCProcedureOptions) => Unsubscribable;
|
|
317
|
+
type DecorateProcedure<TType extends ProcedureType, TDef extends TRPCResolverDef> = TType extends 'query' ? {
|
|
318
|
+
query: Resolver<TDef>;
|
|
319
|
+
} : TType extends 'mutation' ? {
|
|
320
|
+
mutate: Resolver<TDef>;
|
|
321
|
+
} : TType extends 'subscription' ? {
|
|
322
|
+
subscribe: SubscriptionResolver<TDef>;
|
|
323
|
+
} : never;
|
|
324
|
+
/**
|
|
325
|
+
* @internal
|
|
326
|
+
*/
|
|
327
|
+
type DecoratedProcedureRecord<TRoot extends InferrableClientTypes, TRecord extends RouterRecord> = { [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyProcedure ? DecorateProcedure<$Value['_def']['type'], {
|
|
328
|
+
input: inferProcedureInput<$Value>;
|
|
329
|
+
output: inferTransformedProcedureOutput<inferClientTypes<TRoot>, $Value>;
|
|
330
|
+
errorShape: inferClientTypes<TRoot>['errorShape'];
|
|
331
|
+
transformer: inferClientTypes<TRoot>['transformer'];
|
|
332
|
+
}> : $Value extends RouterRecord ? DecoratedProcedureRecord<TRoot, $Value> : never : never };
|
|
333
|
+
/** @internal */
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/client/index.d.ts
|
|
336
|
+
type HttpBatchLinkOptions = Parameters<typeof httpBatchLink>[0];
|
|
337
|
+
declare const DEFAULT_TRPC_URL = "https://rpc.dogeapi.io";
|
|
338
|
+
type DogecoinCoreClientOptions = Omit<HttpBatchLinkOptions, "transformer" | "url"> & {
|
|
339
|
+
url?: HttpBatchLinkOptions["url"];
|
|
340
|
+
};
|
|
341
|
+
declare function createDogecoinCoreClient(options?: DogecoinCoreClientOptions): TRPCClient<BuiltRouter<{
|
|
342
|
+
ctx: object;
|
|
343
|
+
meta: object;
|
|
344
|
+
errorShape: {
|
|
345
|
+
data: {
|
|
346
|
+
zodError: {
|
|
347
|
+
errors: string[];
|
|
348
|
+
} | null;
|
|
349
|
+
code: TRPC_ERROR_CODE_KEY;
|
|
350
|
+
httpStatus: number;
|
|
351
|
+
path?: string;
|
|
352
|
+
stack?: string;
|
|
353
|
+
};
|
|
354
|
+
message: string;
|
|
355
|
+
code: TRPC_ERROR_CODE_NUMBER;
|
|
356
|
+
};
|
|
357
|
+
transformer: true;
|
|
358
|
+
}, DecorateCreateRouterOptions<{
|
|
359
|
+
estimateSmartFee: QueryProcedure<{
|
|
360
|
+
input: {
|
|
361
|
+
requestId: string | null;
|
|
362
|
+
nblocks: number;
|
|
363
|
+
};
|
|
364
|
+
output: {
|
|
365
|
+
id: string | null;
|
|
366
|
+
error: {
|
|
367
|
+
message: string;
|
|
368
|
+
} | null;
|
|
369
|
+
result: {
|
|
370
|
+
feerate: number;
|
|
371
|
+
blocks: number;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
meta: object;
|
|
375
|
+
}>;
|
|
376
|
+
getNetworkInfo: QueryProcedure<{
|
|
377
|
+
input: {
|
|
378
|
+
requestId: string | null;
|
|
379
|
+
};
|
|
380
|
+
output: {
|
|
381
|
+
id: string | null;
|
|
382
|
+
error: {
|
|
383
|
+
message: string;
|
|
384
|
+
} | null;
|
|
385
|
+
result: {
|
|
386
|
+
version: number;
|
|
387
|
+
subversion: string;
|
|
388
|
+
protocolversion: number;
|
|
389
|
+
localservices: string;
|
|
390
|
+
localrelay: boolean;
|
|
391
|
+
timeoffset: number;
|
|
392
|
+
networkactive: boolean;
|
|
393
|
+
connections: number;
|
|
394
|
+
networks: {
|
|
395
|
+
name: string;
|
|
396
|
+
limited: boolean;
|
|
397
|
+
reachable: boolean;
|
|
398
|
+
proxy: string;
|
|
399
|
+
proxy_randomize_credentials: boolean;
|
|
400
|
+
}[];
|
|
401
|
+
relayfee: number;
|
|
402
|
+
incrementalfee: number;
|
|
403
|
+
softdustlimit: number;
|
|
404
|
+
harddustlimit: number;
|
|
405
|
+
localaddresses: {
|
|
406
|
+
address: string;
|
|
407
|
+
port: number;
|
|
408
|
+
score: number;
|
|
409
|
+
}[];
|
|
410
|
+
warnings?: string | undefined;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
meta: object;
|
|
414
|
+
}>;
|
|
415
|
+
getRawTransaction: QueryProcedure<{
|
|
416
|
+
input: {
|
|
417
|
+
requestId: string | null;
|
|
418
|
+
txid: string;
|
|
419
|
+
verbose?: boolean | undefined;
|
|
420
|
+
blockhash?: string | undefined;
|
|
421
|
+
};
|
|
422
|
+
output: {
|
|
423
|
+
id: string | null;
|
|
424
|
+
error: {
|
|
425
|
+
message: string;
|
|
426
|
+
} | null;
|
|
427
|
+
result: string | {
|
|
428
|
+
hex: string;
|
|
429
|
+
txid: string;
|
|
430
|
+
hash: string;
|
|
431
|
+
size: number;
|
|
432
|
+
vsize: number;
|
|
433
|
+
version: number;
|
|
434
|
+
locktime: number;
|
|
435
|
+
vin: {
|
|
436
|
+
txid?: string | undefined;
|
|
437
|
+
vout?: number | undefined;
|
|
438
|
+
scriptSig?: {
|
|
439
|
+
asm: string;
|
|
440
|
+
hex: string;
|
|
441
|
+
} | undefined;
|
|
442
|
+
sequence?: number | undefined;
|
|
443
|
+
}[];
|
|
444
|
+
vout: {
|
|
445
|
+
value: number;
|
|
446
|
+
n: number;
|
|
447
|
+
scriptPubKey: {
|
|
448
|
+
asm: string;
|
|
449
|
+
hex: string;
|
|
450
|
+
type: string;
|
|
451
|
+
addresses: string[];
|
|
452
|
+
reqSigs?: number | undefined;
|
|
453
|
+
};
|
|
454
|
+
}[];
|
|
455
|
+
blockhash?: string | undefined;
|
|
456
|
+
confirmations?: number | undefined;
|
|
457
|
+
time?: number | undefined;
|
|
458
|
+
blocktime?: number | undefined;
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
meta: object;
|
|
462
|
+
}>;
|
|
463
|
+
getBlockHash: QueryProcedure<{
|
|
464
|
+
input: {
|
|
465
|
+
requestId: string | null;
|
|
466
|
+
height: number;
|
|
467
|
+
};
|
|
468
|
+
output: {
|
|
469
|
+
id: string | null;
|
|
470
|
+
error: {
|
|
471
|
+
message: string;
|
|
472
|
+
} | null;
|
|
473
|
+
result: string;
|
|
474
|
+
};
|
|
475
|
+
meta: object;
|
|
476
|
+
}>;
|
|
477
|
+
getBlock: QueryProcedure<{
|
|
478
|
+
input: {
|
|
479
|
+
requestId: string | null;
|
|
480
|
+
blockhash: string;
|
|
481
|
+
verbosity?: number | undefined;
|
|
482
|
+
};
|
|
483
|
+
output: {
|
|
484
|
+
id: string | null;
|
|
485
|
+
error: {
|
|
486
|
+
message: string;
|
|
487
|
+
} | null;
|
|
488
|
+
result: string | {
|
|
489
|
+
hash: string;
|
|
490
|
+
confirmations: number;
|
|
491
|
+
size: number;
|
|
492
|
+
height: number;
|
|
493
|
+
version: number;
|
|
494
|
+
merkleroot: string;
|
|
495
|
+
tx: unknown[];
|
|
496
|
+
time: number;
|
|
497
|
+
nonce: number;
|
|
498
|
+
bits: string;
|
|
499
|
+
difficulty: number;
|
|
500
|
+
strippedsize?: number | undefined;
|
|
501
|
+
weight?: number | undefined;
|
|
502
|
+
versionHex?: string | undefined;
|
|
503
|
+
mediantime?: number | undefined;
|
|
504
|
+
chainwork?: string | undefined;
|
|
505
|
+
nTx?: number | undefined;
|
|
506
|
+
previousblockhash?: string | undefined;
|
|
507
|
+
nextblockhash?: string | undefined;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
meta: object;
|
|
511
|
+
}>;
|
|
512
|
+
getBlockHeader: QueryProcedure<{
|
|
513
|
+
input: {
|
|
514
|
+
requestId: string | null;
|
|
515
|
+
blockhash: string;
|
|
516
|
+
verbose?: boolean | undefined;
|
|
517
|
+
};
|
|
518
|
+
output: {
|
|
519
|
+
id: string | null;
|
|
520
|
+
error: {
|
|
521
|
+
message: string;
|
|
522
|
+
} | null;
|
|
523
|
+
result: string | {
|
|
524
|
+
hash: string;
|
|
525
|
+
confirmations: number;
|
|
526
|
+
height: number;
|
|
527
|
+
version: number;
|
|
528
|
+
merkleroot: string;
|
|
529
|
+
time: number;
|
|
530
|
+
nonce: number;
|
|
531
|
+
bits: string;
|
|
532
|
+
difficulty: number;
|
|
533
|
+
versionHex?: string | undefined;
|
|
534
|
+
mediantime?: number | undefined;
|
|
535
|
+
chainwork?: string | undefined;
|
|
536
|
+
previousblockhash?: string | undefined;
|
|
537
|
+
nextblockhash?: string | undefined;
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
meta: object;
|
|
541
|
+
}>;
|
|
542
|
+
getTxOut: QueryProcedure<{
|
|
543
|
+
input: {
|
|
544
|
+
requestId: string | null;
|
|
545
|
+
txid: string;
|
|
546
|
+
n: number;
|
|
547
|
+
include_mempool?: boolean | undefined;
|
|
548
|
+
};
|
|
549
|
+
output: {
|
|
550
|
+
id: string | null;
|
|
551
|
+
error: {
|
|
552
|
+
message: string;
|
|
553
|
+
} | null;
|
|
554
|
+
result: {
|
|
555
|
+
bestblock: string;
|
|
556
|
+
confirmations: number;
|
|
557
|
+
value: number;
|
|
558
|
+
scriptPubKey: {
|
|
559
|
+
asm: string;
|
|
560
|
+
hex: string;
|
|
561
|
+
type: string;
|
|
562
|
+
reqSigs?: number | undefined;
|
|
563
|
+
addresses?: string[] | undefined;
|
|
564
|
+
};
|
|
565
|
+
coinbase: boolean;
|
|
566
|
+
} | null;
|
|
567
|
+
};
|
|
568
|
+
meta: object;
|
|
569
|
+
}>;
|
|
570
|
+
getChainTips: QueryProcedure<{
|
|
571
|
+
input: {
|
|
572
|
+
requestId: string | null;
|
|
573
|
+
};
|
|
574
|
+
output: {
|
|
575
|
+
id: string | null;
|
|
576
|
+
error: {
|
|
577
|
+
message: string;
|
|
578
|
+
} | null;
|
|
579
|
+
result: {
|
|
580
|
+
height: number;
|
|
581
|
+
hash: string;
|
|
582
|
+
branchlen: number;
|
|
583
|
+
status: string;
|
|
584
|
+
}[];
|
|
585
|
+
};
|
|
586
|
+
meta: object;
|
|
587
|
+
}>;
|
|
588
|
+
getRawMempool: QueryProcedure<{
|
|
589
|
+
input: {
|
|
590
|
+
requestId: string | null;
|
|
591
|
+
verbose?: boolean | undefined;
|
|
592
|
+
mempool_sequence?: boolean | undefined;
|
|
593
|
+
};
|
|
594
|
+
output: {
|
|
595
|
+
id: string | null;
|
|
596
|
+
error: {
|
|
597
|
+
message: string;
|
|
598
|
+
} | null;
|
|
599
|
+
result: string[] | Record<string, {
|
|
600
|
+
vsize: number;
|
|
601
|
+
time: number;
|
|
602
|
+
height: number;
|
|
603
|
+
descendantcount: number;
|
|
604
|
+
descendantsize: number;
|
|
605
|
+
ancestorcount: number;
|
|
606
|
+
ancestorsize: number;
|
|
607
|
+
depends: string[];
|
|
608
|
+
weight?: number | undefined;
|
|
609
|
+
fee?: number | undefined;
|
|
610
|
+
modifiedfee?: number | undefined;
|
|
611
|
+
descendantfees?: number | undefined;
|
|
612
|
+
ancestorfees?: number | undefined;
|
|
613
|
+
wtxid?: string | undefined;
|
|
614
|
+
fees?: {
|
|
615
|
+
base: number;
|
|
616
|
+
modified: number;
|
|
617
|
+
ancestor: number;
|
|
618
|
+
descendant: number;
|
|
619
|
+
} | undefined;
|
|
620
|
+
spentby?: string[] | undefined;
|
|
621
|
+
"bip125-replaceable"?: boolean | undefined;
|
|
622
|
+
unbroadcast?: boolean | undefined;
|
|
623
|
+
}> | {
|
|
624
|
+
txids: string[];
|
|
625
|
+
mempool_sequence: number;
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
meta: object;
|
|
629
|
+
}>;
|
|
630
|
+
getMempoolEntry: QueryProcedure<{
|
|
631
|
+
input: {
|
|
632
|
+
requestId: string | null;
|
|
633
|
+
txid: string;
|
|
634
|
+
};
|
|
635
|
+
output: Record<string, unknown> | {
|
|
636
|
+
id: string | number | null;
|
|
637
|
+
error: {
|
|
638
|
+
message: string;
|
|
639
|
+
code?: number | undefined;
|
|
640
|
+
} | null;
|
|
641
|
+
result: Record<string, unknown> | null;
|
|
642
|
+
};
|
|
643
|
+
meta: object;
|
|
644
|
+
}>;
|
|
645
|
+
getMempoolAncestors: QueryProcedure<{
|
|
646
|
+
input: {
|
|
647
|
+
requestId: string | null;
|
|
648
|
+
txid: string;
|
|
649
|
+
verbose?: boolean | undefined;
|
|
650
|
+
};
|
|
651
|
+
output: {
|
|
652
|
+
id: string | null;
|
|
653
|
+
error: {
|
|
654
|
+
message: string;
|
|
655
|
+
} | null;
|
|
656
|
+
result: string[] | Record<string, Record<string, unknown>>;
|
|
657
|
+
};
|
|
658
|
+
meta: object;
|
|
659
|
+
}>;
|
|
660
|
+
getMempoolDescendants: QueryProcedure<{
|
|
661
|
+
input: {
|
|
662
|
+
requestId: string | null;
|
|
663
|
+
txid: string;
|
|
664
|
+
verbose?: boolean | undefined;
|
|
665
|
+
};
|
|
666
|
+
output: {
|
|
667
|
+
id: string | null;
|
|
668
|
+
error: {
|
|
669
|
+
message: string;
|
|
670
|
+
} | null;
|
|
671
|
+
result: string[] | Record<string, Record<string, unknown>>;
|
|
672
|
+
};
|
|
673
|
+
meta: object;
|
|
674
|
+
}>;
|
|
675
|
+
getMempoolInfo: QueryProcedure<{
|
|
676
|
+
input: {
|
|
677
|
+
requestId: string | null;
|
|
678
|
+
};
|
|
679
|
+
output: {
|
|
680
|
+
id: string | null;
|
|
681
|
+
error: {
|
|
682
|
+
message: string;
|
|
683
|
+
} | null;
|
|
684
|
+
result: {
|
|
685
|
+
size: number;
|
|
686
|
+
bytes: number;
|
|
687
|
+
usage: number;
|
|
688
|
+
loaded?: boolean | undefined;
|
|
689
|
+
maxmempool?: number | undefined;
|
|
690
|
+
mempoolminfee?: number | undefined;
|
|
691
|
+
minrelaytxfee?: number | undefined;
|
|
692
|
+
unbroadcastcount?: number | undefined;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
meta: object;
|
|
696
|
+
}>;
|
|
697
|
+
getBestBlockHash: QueryProcedure<{
|
|
698
|
+
input: {
|
|
699
|
+
requestId: string | null;
|
|
700
|
+
};
|
|
701
|
+
output: {
|
|
702
|
+
id: string | null;
|
|
703
|
+
error: {
|
|
704
|
+
message: string;
|
|
705
|
+
} | null;
|
|
706
|
+
result: string;
|
|
707
|
+
};
|
|
708
|
+
meta: object;
|
|
709
|
+
}>;
|
|
710
|
+
getBlockCount: QueryProcedure<{
|
|
711
|
+
input: {
|
|
712
|
+
requestId: string | null;
|
|
713
|
+
};
|
|
714
|
+
output: {
|
|
715
|
+
id: string | null;
|
|
716
|
+
error: {
|
|
717
|
+
message: string;
|
|
718
|
+
} | null;
|
|
719
|
+
result: number;
|
|
720
|
+
};
|
|
721
|
+
meta: object;
|
|
722
|
+
}>;
|
|
723
|
+
getDifficulty: QueryProcedure<{
|
|
724
|
+
input: {
|
|
725
|
+
requestId: string | null;
|
|
726
|
+
};
|
|
727
|
+
output: {
|
|
728
|
+
id: string | null;
|
|
729
|
+
error: {
|
|
730
|
+
message: string;
|
|
731
|
+
} | null;
|
|
732
|
+
result: number;
|
|
733
|
+
};
|
|
734
|
+
meta: object;
|
|
735
|
+
}>;
|
|
736
|
+
getNetworkHashPs: QueryProcedure<{
|
|
737
|
+
input: {
|
|
738
|
+
requestId: string | null;
|
|
739
|
+
nblocks?: number | undefined;
|
|
740
|
+
height?: number | undefined;
|
|
741
|
+
};
|
|
742
|
+
output: {
|
|
743
|
+
id: string | null;
|
|
744
|
+
error: {
|
|
745
|
+
message: string;
|
|
746
|
+
} | null;
|
|
747
|
+
result: number;
|
|
748
|
+
};
|
|
749
|
+
meta: object;
|
|
750
|
+
}>;
|
|
751
|
+
getBlockchainInfo: QueryProcedure<{
|
|
752
|
+
input: {
|
|
753
|
+
requestId: string | null;
|
|
754
|
+
};
|
|
755
|
+
output: {
|
|
756
|
+
id: string | null;
|
|
757
|
+
error: {
|
|
758
|
+
message: string;
|
|
759
|
+
} | null;
|
|
760
|
+
result: {
|
|
761
|
+
chain: string;
|
|
762
|
+
blocks: number;
|
|
763
|
+
headers: number;
|
|
764
|
+
bestblockhash: string;
|
|
765
|
+
difficulty: number;
|
|
766
|
+
mediantime: number;
|
|
767
|
+
verificationprogress: number;
|
|
768
|
+
initialblockdownload: boolean;
|
|
769
|
+
chainwork: string;
|
|
770
|
+
size_on_disk: number;
|
|
771
|
+
pruned: boolean;
|
|
772
|
+
pruneheight?: number | undefined;
|
|
773
|
+
automatic_pruning?: boolean | undefined;
|
|
774
|
+
prune_target_size?: number | undefined;
|
|
775
|
+
softforks?: Record<string, unknown> | unknown[] | undefined;
|
|
776
|
+
bip9_softforks?: Record<string, unknown> | undefined;
|
|
777
|
+
warnings?: string | undefined;
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
meta: object;
|
|
781
|
+
}>;
|
|
782
|
+
listUnspent: QueryProcedure<{
|
|
783
|
+
input: {
|
|
784
|
+
requestId: string | null;
|
|
785
|
+
minconf?: number | undefined;
|
|
786
|
+
maxconf?: number | undefined;
|
|
787
|
+
addresses?: string[] | undefined;
|
|
788
|
+
include_unsafe?: boolean | undefined;
|
|
789
|
+
query_options?: {
|
|
790
|
+
minimumAmount?: number | undefined;
|
|
791
|
+
maximumAmount?: number | undefined;
|
|
792
|
+
maximumCount?: number | undefined;
|
|
793
|
+
minimumSumAmount?: number | undefined;
|
|
794
|
+
} | undefined;
|
|
795
|
+
};
|
|
796
|
+
output: {
|
|
797
|
+
id: string | null;
|
|
798
|
+
error: {
|
|
799
|
+
message: string;
|
|
800
|
+
} | null;
|
|
801
|
+
result: {
|
|
802
|
+
txid: string;
|
|
803
|
+
vout: number;
|
|
804
|
+
scriptPubKey: string;
|
|
805
|
+
amount: number;
|
|
806
|
+
confirmations: number;
|
|
807
|
+
spendable: boolean;
|
|
808
|
+
solvable: boolean;
|
|
809
|
+
address?: string | undefined;
|
|
810
|
+
account?: string | undefined;
|
|
811
|
+
redeemScript?: string | undefined;
|
|
812
|
+
safe?: boolean | undefined;
|
|
813
|
+
}[];
|
|
814
|
+
};
|
|
815
|
+
meta: object;
|
|
816
|
+
}>;
|
|
817
|
+
getTxOutProof: QueryProcedure<{
|
|
818
|
+
input: {
|
|
819
|
+
requestId: string | null;
|
|
820
|
+
txids: string[];
|
|
821
|
+
blockhash?: string | undefined;
|
|
822
|
+
};
|
|
823
|
+
output: {
|
|
824
|
+
id: string | null;
|
|
825
|
+
error: {
|
|
826
|
+
message: string;
|
|
827
|
+
} | null;
|
|
828
|
+
result: string;
|
|
829
|
+
};
|
|
830
|
+
meta: object;
|
|
831
|
+
}>;
|
|
832
|
+
verifyTxOutProof: QueryProcedure<{
|
|
833
|
+
input: {
|
|
834
|
+
requestId: string | null;
|
|
835
|
+
proof: string;
|
|
836
|
+
};
|
|
837
|
+
output: {
|
|
838
|
+
id: string | null;
|
|
839
|
+
error: {
|
|
840
|
+
message: string;
|
|
841
|
+
} | null;
|
|
842
|
+
result: string[];
|
|
843
|
+
};
|
|
844
|
+
meta: object;
|
|
845
|
+
}>;
|
|
846
|
+
validateAddress: QueryProcedure<{
|
|
847
|
+
input: {
|
|
848
|
+
requestId: string | null;
|
|
849
|
+
address: string;
|
|
850
|
+
};
|
|
851
|
+
output: {
|
|
852
|
+
id: string | null;
|
|
853
|
+
error: {
|
|
854
|
+
message: string;
|
|
855
|
+
} | null;
|
|
856
|
+
result: {
|
|
857
|
+
isvalid: boolean;
|
|
858
|
+
address?: string | undefined;
|
|
859
|
+
scriptPubKey?: string | undefined;
|
|
860
|
+
isscript?: boolean | undefined;
|
|
861
|
+
iswitness?: boolean | undefined;
|
|
862
|
+
witness_version?: number | undefined;
|
|
863
|
+
witness_program?: string | undefined;
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
meta: object;
|
|
867
|
+
}>;
|
|
868
|
+
ping: QueryProcedure<{
|
|
869
|
+
input: {
|
|
870
|
+
requestId: string | null;
|
|
871
|
+
};
|
|
872
|
+
output: {
|
|
873
|
+
id: string | null;
|
|
874
|
+
error: {
|
|
875
|
+
message: string;
|
|
876
|
+
} | null;
|
|
877
|
+
result: null;
|
|
878
|
+
};
|
|
879
|
+
meta: object;
|
|
880
|
+
}>;
|
|
881
|
+
sendRawTransaction: MutationProcedure<{
|
|
882
|
+
input: {
|
|
883
|
+
requestId: string | null;
|
|
884
|
+
hexstring: string;
|
|
885
|
+
maxfeerate?: string | number | undefined;
|
|
886
|
+
};
|
|
887
|
+
output: {
|
|
888
|
+
id: string | null;
|
|
889
|
+
error: {
|
|
890
|
+
message: string;
|
|
891
|
+
} | null;
|
|
892
|
+
result: string;
|
|
893
|
+
};
|
|
894
|
+
meta: object;
|
|
895
|
+
}>;
|
|
896
|
+
health: QueryProcedure<{
|
|
897
|
+
input: void;
|
|
898
|
+
output: {
|
|
899
|
+
status: string;
|
|
900
|
+
message: string;
|
|
901
|
+
};
|
|
902
|
+
meta: object;
|
|
903
|
+
}>;
|
|
904
|
+
}>>>;
|
|
905
|
+
type DogecoinCoreClient = ReturnType<typeof createDogecoinCoreClient>;
|
|
906
|
+
//#endregion
|
|
907
|
+
export { type AppRouter, DEFAULT_TRPC_URL, DogecoinCoreClient, DogecoinCoreClientOptions, createDogecoinCoreClient };
|