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.
- package/dist/client/index.cjs +1 -6
- package/dist/client/index.d.cts +898 -568
- 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 -569
- 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-FH72CRD7.js +0 -45
- package/dist/chunk-OP2QDE6K.js +0 -4
- package/dist/chunk-Z4KAWBXZ.js +0 -22
- package/dist/client/index.d.ts +0 -577
- 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 -569
- package/dist/server/index.js +0 -1
package/dist/client/index.d.ts
DELETED
|
@@ -1,577 +0,0 @@
|
|
|
1
|
-
import * as _trpc_client from '@trpc/client';
|
|
2
|
-
import { httpBatchLink } from '@trpc/client';
|
|
3
|
-
import * as _trpc_server from '@trpc/server';
|
|
4
|
-
export { AppRouter } from '../server/index.js';
|
|
5
|
-
|
|
6
|
-
type HttpBatchLinkOptions = Parameters<typeof httpBatchLink>[0];
|
|
7
|
-
declare const DEFAULT_TRPC_URL = "https://rpc.dogeapi.io";
|
|
8
|
-
type DogecoinCoreClientOptions = Omit<HttpBatchLinkOptions, "transformer" | "url"> & {
|
|
9
|
-
url?: HttpBatchLinkOptions["url"];
|
|
10
|
-
};
|
|
11
|
-
declare function createDogecoinCoreClient(options?: DogecoinCoreClientOptions): _trpc_client.TRPCClient<_trpc_server.TRPCBuiltRouter<{
|
|
12
|
-
ctx: object;
|
|
13
|
-
meta: object;
|
|
14
|
-
errorShape: {
|
|
15
|
-
data: {
|
|
16
|
-
zodError: {
|
|
17
|
-
errors: string[];
|
|
18
|
-
} | null;
|
|
19
|
-
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
20
|
-
httpStatus: number;
|
|
21
|
-
path?: string;
|
|
22
|
-
stack?: string;
|
|
23
|
-
};
|
|
24
|
-
message: string;
|
|
25
|
-
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
26
|
-
};
|
|
27
|
-
transformer: true;
|
|
28
|
-
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
29
|
-
estimateSmartFee: _trpc_server.TRPCQueryProcedure<{
|
|
30
|
-
input: {
|
|
31
|
-
requestId: string | null;
|
|
32
|
-
nblocks: number;
|
|
33
|
-
};
|
|
34
|
-
output: {
|
|
35
|
-
id: string | null;
|
|
36
|
-
error: {
|
|
37
|
-
message: string;
|
|
38
|
-
} | null;
|
|
39
|
-
result: {
|
|
40
|
-
feerate: number;
|
|
41
|
-
blocks: number;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
meta: object;
|
|
45
|
-
}>;
|
|
46
|
-
getNetworkInfo: _trpc_server.TRPCQueryProcedure<{
|
|
47
|
-
input: {
|
|
48
|
-
requestId: string | null;
|
|
49
|
-
};
|
|
50
|
-
output: {
|
|
51
|
-
id: string | null;
|
|
52
|
-
error: {
|
|
53
|
-
message: string;
|
|
54
|
-
} | null;
|
|
55
|
-
result: {
|
|
56
|
-
version: number;
|
|
57
|
-
subversion: string;
|
|
58
|
-
protocolversion: number;
|
|
59
|
-
localservices: string;
|
|
60
|
-
localrelay: boolean;
|
|
61
|
-
timeoffset: number;
|
|
62
|
-
networkactive: boolean;
|
|
63
|
-
connections: number;
|
|
64
|
-
networks: {
|
|
65
|
-
name: string;
|
|
66
|
-
limited: boolean;
|
|
67
|
-
reachable: boolean;
|
|
68
|
-
proxy: string;
|
|
69
|
-
proxy_randomize_credentials: boolean;
|
|
70
|
-
}[];
|
|
71
|
-
relayfee: number;
|
|
72
|
-
incrementalfee: number;
|
|
73
|
-
softdustlimit: number;
|
|
74
|
-
harddustlimit: number;
|
|
75
|
-
localaddresses: {
|
|
76
|
-
address: string;
|
|
77
|
-
port: number;
|
|
78
|
-
score: number;
|
|
79
|
-
}[];
|
|
80
|
-
warnings?: string | undefined;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
meta: object;
|
|
84
|
-
}>;
|
|
85
|
-
getRawTransaction: _trpc_server.TRPCQueryProcedure<{
|
|
86
|
-
input: {
|
|
87
|
-
requestId: string | null;
|
|
88
|
-
txid: string;
|
|
89
|
-
verbose?: boolean | undefined;
|
|
90
|
-
blockhash?: string | undefined;
|
|
91
|
-
};
|
|
92
|
-
output: {
|
|
93
|
-
id: string | null;
|
|
94
|
-
error: {
|
|
95
|
-
message: string;
|
|
96
|
-
} | null;
|
|
97
|
-
result: string | {
|
|
98
|
-
hex: string;
|
|
99
|
-
txid: string;
|
|
100
|
-
hash: string;
|
|
101
|
-
size: number;
|
|
102
|
-
vsize: number;
|
|
103
|
-
version: number;
|
|
104
|
-
locktime: number;
|
|
105
|
-
vin: {
|
|
106
|
-
txid?: string | undefined;
|
|
107
|
-
vout?: number | undefined;
|
|
108
|
-
scriptSig?: {
|
|
109
|
-
asm: string;
|
|
110
|
-
hex: string;
|
|
111
|
-
} | undefined;
|
|
112
|
-
sequence?: number | undefined;
|
|
113
|
-
}[];
|
|
114
|
-
vout: {
|
|
115
|
-
value: number;
|
|
116
|
-
n: number;
|
|
117
|
-
scriptPubKey: {
|
|
118
|
-
asm: string;
|
|
119
|
-
hex: string;
|
|
120
|
-
type: string;
|
|
121
|
-
addresses: string[];
|
|
122
|
-
reqSigs?: number | undefined;
|
|
123
|
-
};
|
|
124
|
-
}[];
|
|
125
|
-
blockhash?: string | undefined;
|
|
126
|
-
confirmations?: number | undefined;
|
|
127
|
-
time?: number | undefined;
|
|
128
|
-
blocktime?: number | undefined;
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
meta: object;
|
|
132
|
-
}>;
|
|
133
|
-
getBlockHash: _trpc_server.TRPCQueryProcedure<{
|
|
134
|
-
input: {
|
|
135
|
-
requestId: string | null;
|
|
136
|
-
height: number;
|
|
137
|
-
};
|
|
138
|
-
output: {
|
|
139
|
-
id: string | null;
|
|
140
|
-
error: {
|
|
141
|
-
message: string;
|
|
142
|
-
} | null;
|
|
143
|
-
result: string;
|
|
144
|
-
};
|
|
145
|
-
meta: object;
|
|
146
|
-
}>;
|
|
147
|
-
getBlock: _trpc_server.TRPCQueryProcedure<{
|
|
148
|
-
input: {
|
|
149
|
-
requestId: string | null;
|
|
150
|
-
blockhash: string;
|
|
151
|
-
verbosity?: number | undefined;
|
|
152
|
-
};
|
|
153
|
-
output: {
|
|
154
|
-
id: string | null;
|
|
155
|
-
error: {
|
|
156
|
-
message: string;
|
|
157
|
-
} | null;
|
|
158
|
-
result: string | {
|
|
159
|
-
hash: string;
|
|
160
|
-
confirmations: number;
|
|
161
|
-
size: number;
|
|
162
|
-
height: number;
|
|
163
|
-
version: number;
|
|
164
|
-
merkleroot: string;
|
|
165
|
-
tx: unknown[];
|
|
166
|
-
time: number;
|
|
167
|
-
nonce: number;
|
|
168
|
-
bits: string;
|
|
169
|
-
difficulty: number;
|
|
170
|
-
strippedsize?: number | undefined;
|
|
171
|
-
weight?: number | undefined;
|
|
172
|
-
versionHex?: string | undefined;
|
|
173
|
-
mediantime?: number | undefined;
|
|
174
|
-
chainwork?: string | undefined;
|
|
175
|
-
nTx?: number | undefined;
|
|
176
|
-
previousblockhash?: string | undefined;
|
|
177
|
-
nextblockhash?: string | undefined;
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
meta: object;
|
|
181
|
-
}>;
|
|
182
|
-
getBlockHeader: _trpc_server.TRPCQueryProcedure<{
|
|
183
|
-
input: {
|
|
184
|
-
requestId: string | null;
|
|
185
|
-
blockhash: string;
|
|
186
|
-
verbose?: boolean | undefined;
|
|
187
|
-
};
|
|
188
|
-
output: {
|
|
189
|
-
id: string | null;
|
|
190
|
-
error: {
|
|
191
|
-
message: string;
|
|
192
|
-
} | null;
|
|
193
|
-
result: string | {
|
|
194
|
-
hash: string;
|
|
195
|
-
confirmations: number;
|
|
196
|
-
height: number;
|
|
197
|
-
version: number;
|
|
198
|
-
merkleroot: string;
|
|
199
|
-
time: number;
|
|
200
|
-
nonce: number;
|
|
201
|
-
bits: string;
|
|
202
|
-
difficulty: number;
|
|
203
|
-
versionHex?: string | undefined;
|
|
204
|
-
mediantime?: number | undefined;
|
|
205
|
-
chainwork?: string | undefined;
|
|
206
|
-
previousblockhash?: string | undefined;
|
|
207
|
-
nextblockhash?: string | undefined;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
meta: object;
|
|
211
|
-
}>;
|
|
212
|
-
getTxOut: _trpc_server.TRPCQueryProcedure<{
|
|
213
|
-
input: {
|
|
214
|
-
requestId: string | null;
|
|
215
|
-
txid: string;
|
|
216
|
-
n: number;
|
|
217
|
-
include_mempool?: boolean | undefined;
|
|
218
|
-
};
|
|
219
|
-
output: {
|
|
220
|
-
id: string | null;
|
|
221
|
-
error: {
|
|
222
|
-
message: string;
|
|
223
|
-
} | null;
|
|
224
|
-
result: {
|
|
225
|
-
bestblock: string;
|
|
226
|
-
confirmations: number;
|
|
227
|
-
value: number;
|
|
228
|
-
scriptPubKey: {
|
|
229
|
-
asm: string;
|
|
230
|
-
hex: string;
|
|
231
|
-
type: string;
|
|
232
|
-
reqSigs?: number | undefined;
|
|
233
|
-
addresses?: string[] | undefined;
|
|
234
|
-
};
|
|
235
|
-
coinbase: boolean;
|
|
236
|
-
} | null;
|
|
237
|
-
};
|
|
238
|
-
meta: object;
|
|
239
|
-
}>;
|
|
240
|
-
getChainTips: _trpc_server.TRPCQueryProcedure<{
|
|
241
|
-
input: {
|
|
242
|
-
requestId: string | null;
|
|
243
|
-
};
|
|
244
|
-
output: {
|
|
245
|
-
id: string | null;
|
|
246
|
-
error: {
|
|
247
|
-
message: string;
|
|
248
|
-
} | null;
|
|
249
|
-
result: {
|
|
250
|
-
height: number;
|
|
251
|
-
hash: string;
|
|
252
|
-
branchlen: number;
|
|
253
|
-
status: string;
|
|
254
|
-
}[];
|
|
255
|
-
};
|
|
256
|
-
meta: object;
|
|
257
|
-
}>;
|
|
258
|
-
getRawMempool: _trpc_server.TRPCQueryProcedure<{
|
|
259
|
-
input: {
|
|
260
|
-
requestId: string | null;
|
|
261
|
-
verbose?: boolean | undefined;
|
|
262
|
-
mempool_sequence?: boolean | undefined;
|
|
263
|
-
};
|
|
264
|
-
output: {
|
|
265
|
-
id: string | null;
|
|
266
|
-
error: {
|
|
267
|
-
message: string;
|
|
268
|
-
} | null;
|
|
269
|
-
result: string[] | Record<string, {
|
|
270
|
-
vsize: number;
|
|
271
|
-
time: number;
|
|
272
|
-
height: number;
|
|
273
|
-
descendantcount: number;
|
|
274
|
-
descendantsize: number;
|
|
275
|
-
ancestorcount: number;
|
|
276
|
-
ancestorsize: number;
|
|
277
|
-
depends: string[];
|
|
278
|
-
weight?: number | undefined;
|
|
279
|
-
fee?: number | undefined;
|
|
280
|
-
modifiedfee?: number | undefined;
|
|
281
|
-
descendantfees?: number | undefined;
|
|
282
|
-
ancestorfees?: number | undefined;
|
|
283
|
-
wtxid?: string | undefined;
|
|
284
|
-
fees?: {
|
|
285
|
-
base: number;
|
|
286
|
-
modified: number;
|
|
287
|
-
ancestor: number;
|
|
288
|
-
descendant: number;
|
|
289
|
-
} | undefined;
|
|
290
|
-
spentby?: string[] | undefined;
|
|
291
|
-
"bip125-replaceable"?: boolean | undefined;
|
|
292
|
-
unbroadcast?: boolean | undefined;
|
|
293
|
-
}> | {
|
|
294
|
-
txids: string[];
|
|
295
|
-
mempool_sequence: number;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
meta: object;
|
|
299
|
-
}>;
|
|
300
|
-
getMempoolEntry: _trpc_server.TRPCQueryProcedure<{
|
|
301
|
-
input: {
|
|
302
|
-
requestId: string | null;
|
|
303
|
-
txid: string;
|
|
304
|
-
};
|
|
305
|
-
output: Record<string, unknown> | {
|
|
306
|
-
id: string | number | null;
|
|
307
|
-
error: {
|
|
308
|
-
message: string;
|
|
309
|
-
code?: number | undefined;
|
|
310
|
-
} | null;
|
|
311
|
-
result: Record<string, unknown> | null;
|
|
312
|
-
};
|
|
313
|
-
meta: object;
|
|
314
|
-
}>;
|
|
315
|
-
getMempoolAncestors: _trpc_server.TRPCQueryProcedure<{
|
|
316
|
-
input: {
|
|
317
|
-
requestId: string | null;
|
|
318
|
-
txid: string;
|
|
319
|
-
verbose?: boolean | undefined;
|
|
320
|
-
};
|
|
321
|
-
output: {
|
|
322
|
-
id: string | null;
|
|
323
|
-
error: {
|
|
324
|
-
message: string;
|
|
325
|
-
} | null;
|
|
326
|
-
result: string[] | Record<string, Record<string, unknown>>;
|
|
327
|
-
};
|
|
328
|
-
meta: object;
|
|
329
|
-
}>;
|
|
330
|
-
getMempoolDescendants: _trpc_server.TRPCQueryProcedure<{
|
|
331
|
-
input: {
|
|
332
|
-
requestId: string | null;
|
|
333
|
-
txid: string;
|
|
334
|
-
verbose?: boolean | undefined;
|
|
335
|
-
};
|
|
336
|
-
output: {
|
|
337
|
-
id: string | null;
|
|
338
|
-
error: {
|
|
339
|
-
message: string;
|
|
340
|
-
} | null;
|
|
341
|
-
result: string[] | Record<string, Record<string, unknown>>;
|
|
342
|
-
};
|
|
343
|
-
meta: object;
|
|
344
|
-
}>;
|
|
345
|
-
getMempoolInfo: _trpc_server.TRPCQueryProcedure<{
|
|
346
|
-
input: {
|
|
347
|
-
requestId: string | null;
|
|
348
|
-
};
|
|
349
|
-
output: {
|
|
350
|
-
id: string | null;
|
|
351
|
-
error: {
|
|
352
|
-
message: string;
|
|
353
|
-
} | null;
|
|
354
|
-
result: {
|
|
355
|
-
size: number;
|
|
356
|
-
bytes: number;
|
|
357
|
-
usage: number;
|
|
358
|
-
loaded?: boolean | undefined;
|
|
359
|
-
maxmempool?: number | undefined;
|
|
360
|
-
mempoolminfee?: number | undefined;
|
|
361
|
-
minrelaytxfee?: number | undefined;
|
|
362
|
-
unbroadcastcount?: number | undefined;
|
|
363
|
-
};
|
|
364
|
-
};
|
|
365
|
-
meta: object;
|
|
366
|
-
}>;
|
|
367
|
-
getBestBlockHash: _trpc_server.TRPCQueryProcedure<{
|
|
368
|
-
input: {
|
|
369
|
-
requestId: string | null;
|
|
370
|
-
};
|
|
371
|
-
output: {
|
|
372
|
-
id: string | null;
|
|
373
|
-
error: {
|
|
374
|
-
message: string;
|
|
375
|
-
} | null;
|
|
376
|
-
result: string;
|
|
377
|
-
};
|
|
378
|
-
meta: object;
|
|
379
|
-
}>;
|
|
380
|
-
getBlockCount: _trpc_server.TRPCQueryProcedure<{
|
|
381
|
-
input: {
|
|
382
|
-
requestId: string | null;
|
|
383
|
-
};
|
|
384
|
-
output: {
|
|
385
|
-
id: string | null;
|
|
386
|
-
error: {
|
|
387
|
-
message: string;
|
|
388
|
-
} | null;
|
|
389
|
-
result: number;
|
|
390
|
-
};
|
|
391
|
-
meta: object;
|
|
392
|
-
}>;
|
|
393
|
-
getDifficulty: _trpc_server.TRPCQueryProcedure<{
|
|
394
|
-
input: {
|
|
395
|
-
requestId: string | null;
|
|
396
|
-
};
|
|
397
|
-
output: {
|
|
398
|
-
id: string | null;
|
|
399
|
-
error: {
|
|
400
|
-
message: string;
|
|
401
|
-
} | null;
|
|
402
|
-
result: number;
|
|
403
|
-
};
|
|
404
|
-
meta: object;
|
|
405
|
-
}>;
|
|
406
|
-
getNetworkHashPs: _trpc_server.TRPCQueryProcedure<{
|
|
407
|
-
input: {
|
|
408
|
-
requestId: string | null;
|
|
409
|
-
nblocks?: number | undefined;
|
|
410
|
-
height?: number | undefined;
|
|
411
|
-
};
|
|
412
|
-
output: {
|
|
413
|
-
id: string | null;
|
|
414
|
-
error: {
|
|
415
|
-
message: string;
|
|
416
|
-
} | null;
|
|
417
|
-
result: number;
|
|
418
|
-
};
|
|
419
|
-
meta: object;
|
|
420
|
-
}>;
|
|
421
|
-
getBlockchainInfo: _trpc_server.TRPCQueryProcedure<{
|
|
422
|
-
input: {
|
|
423
|
-
requestId: string | null;
|
|
424
|
-
};
|
|
425
|
-
output: {
|
|
426
|
-
id: string | null;
|
|
427
|
-
error: {
|
|
428
|
-
message: string;
|
|
429
|
-
} | null;
|
|
430
|
-
result: {
|
|
431
|
-
chain: string;
|
|
432
|
-
blocks: number;
|
|
433
|
-
headers: number;
|
|
434
|
-
bestblockhash: string;
|
|
435
|
-
difficulty: number;
|
|
436
|
-
mediantime: number;
|
|
437
|
-
verificationprogress: number;
|
|
438
|
-
initialblockdownload: boolean;
|
|
439
|
-
chainwork: string;
|
|
440
|
-
size_on_disk: number;
|
|
441
|
-
pruned: boolean;
|
|
442
|
-
pruneheight?: number | undefined;
|
|
443
|
-
automatic_pruning?: boolean | undefined;
|
|
444
|
-
prune_target_size?: number | undefined;
|
|
445
|
-
softforks?: unknown[] | Record<string, unknown> | undefined;
|
|
446
|
-
bip9_softforks?: Record<string, unknown> | undefined;
|
|
447
|
-
warnings?: string | undefined;
|
|
448
|
-
};
|
|
449
|
-
};
|
|
450
|
-
meta: object;
|
|
451
|
-
}>;
|
|
452
|
-
listUnspent: _trpc_server.TRPCQueryProcedure<{
|
|
453
|
-
input: {
|
|
454
|
-
requestId: string | null;
|
|
455
|
-
minconf?: number | undefined;
|
|
456
|
-
maxconf?: number | undefined;
|
|
457
|
-
addresses?: string[] | undefined;
|
|
458
|
-
include_unsafe?: boolean | undefined;
|
|
459
|
-
query_options?: {
|
|
460
|
-
minimumAmount?: number | undefined;
|
|
461
|
-
maximumAmount?: number | undefined;
|
|
462
|
-
maximumCount?: number | undefined;
|
|
463
|
-
minimumSumAmount?: number | undefined;
|
|
464
|
-
} | undefined;
|
|
465
|
-
};
|
|
466
|
-
output: {
|
|
467
|
-
id: string | null;
|
|
468
|
-
error: {
|
|
469
|
-
message: string;
|
|
470
|
-
} | null;
|
|
471
|
-
result: {
|
|
472
|
-
txid: string;
|
|
473
|
-
vout: number;
|
|
474
|
-
scriptPubKey: string;
|
|
475
|
-
amount: number;
|
|
476
|
-
confirmations: number;
|
|
477
|
-
spendable: boolean;
|
|
478
|
-
solvable: boolean;
|
|
479
|
-
address?: string | undefined;
|
|
480
|
-
account?: string | undefined;
|
|
481
|
-
redeemScript?: string | undefined;
|
|
482
|
-
safe?: boolean | undefined;
|
|
483
|
-
}[];
|
|
484
|
-
};
|
|
485
|
-
meta: object;
|
|
486
|
-
}>;
|
|
487
|
-
getTxOutProof: _trpc_server.TRPCQueryProcedure<{
|
|
488
|
-
input: {
|
|
489
|
-
requestId: string | null;
|
|
490
|
-
txids: string[];
|
|
491
|
-
blockhash?: string | undefined;
|
|
492
|
-
};
|
|
493
|
-
output: {
|
|
494
|
-
id: string | null;
|
|
495
|
-
error: {
|
|
496
|
-
message: string;
|
|
497
|
-
} | null;
|
|
498
|
-
result: string;
|
|
499
|
-
};
|
|
500
|
-
meta: object;
|
|
501
|
-
}>;
|
|
502
|
-
verifyTxOutProof: _trpc_server.TRPCQueryProcedure<{
|
|
503
|
-
input: {
|
|
504
|
-
requestId: string | null;
|
|
505
|
-
proof: string;
|
|
506
|
-
};
|
|
507
|
-
output: {
|
|
508
|
-
id: string | null;
|
|
509
|
-
error: {
|
|
510
|
-
message: string;
|
|
511
|
-
} | null;
|
|
512
|
-
result: string[];
|
|
513
|
-
};
|
|
514
|
-
meta: object;
|
|
515
|
-
}>;
|
|
516
|
-
validateAddress: _trpc_server.TRPCQueryProcedure<{
|
|
517
|
-
input: {
|
|
518
|
-
requestId: string | null;
|
|
519
|
-
address: string;
|
|
520
|
-
};
|
|
521
|
-
output: {
|
|
522
|
-
id: string | null;
|
|
523
|
-
error: {
|
|
524
|
-
message: string;
|
|
525
|
-
} | null;
|
|
526
|
-
result: {
|
|
527
|
-
isvalid: boolean;
|
|
528
|
-
address?: string | undefined;
|
|
529
|
-
scriptPubKey?: string | undefined;
|
|
530
|
-
isscript?: boolean | undefined;
|
|
531
|
-
iswitness?: boolean | undefined;
|
|
532
|
-
witness_version?: number | undefined;
|
|
533
|
-
witness_program?: string | undefined;
|
|
534
|
-
};
|
|
535
|
-
};
|
|
536
|
-
meta: object;
|
|
537
|
-
}>;
|
|
538
|
-
ping: _trpc_server.TRPCQueryProcedure<{
|
|
539
|
-
input: {
|
|
540
|
-
requestId: string | null;
|
|
541
|
-
};
|
|
542
|
-
output: {
|
|
543
|
-
id: string | null;
|
|
544
|
-
error: {
|
|
545
|
-
message: string;
|
|
546
|
-
} | null;
|
|
547
|
-
result: null;
|
|
548
|
-
};
|
|
549
|
-
meta: object;
|
|
550
|
-
}>;
|
|
551
|
-
sendRawTransaction: _trpc_server.TRPCMutationProcedure<{
|
|
552
|
-
input: {
|
|
553
|
-
requestId: string | null;
|
|
554
|
-
hexstring: string;
|
|
555
|
-
maxfeerate?: string | number | undefined;
|
|
556
|
-
};
|
|
557
|
-
output: {
|
|
558
|
-
id: string | null;
|
|
559
|
-
error: {
|
|
560
|
-
message: string;
|
|
561
|
-
} | null;
|
|
562
|
-
result: string;
|
|
563
|
-
};
|
|
564
|
-
meta: object;
|
|
565
|
-
}>;
|
|
566
|
-
health: _trpc_server.TRPCQueryProcedure<{
|
|
567
|
-
input: void;
|
|
568
|
-
output: {
|
|
569
|
-
status: string;
|
|
570
|
-
message: string;
|
|
571
|
-
};
|
|
572
|
-
meta: object;
|
|
573
|
-
}>;
|
|
574
|
-
}>>>;
|
|
575
|
-
type DogecoinCoreClient = ReturnType<typeof createDogecoinCoreClient>;
|
|
576
|
-
|
|
577
|
-
export { DEFAULT_TRPC_URL, type DogecoinCoreClient, type DogecoinCoreClientOptions, createDogecoinCoreClient };
|
package/dist/client/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as w,b as N}from"../chunk-Z4KAWBXZ.js";import{b as k,k as I,l as D,t as B,x as $}from"../chunk-OP2QDE6K.js";var le=Object.create,Y=Object.defineProperty,de=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyNames,pe=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty,x=(t,e)=>function(){return e||(0,t[K(t)[0]])((e={exports:{}}).exports,e),e.exports},me=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=K(e),i=0,u=n.length,s;i<u;i++)s=n[i],!fe.call(t,s)&&s!==r&&Y(t,s,{get:(a=>e[a]).bind(null,s),enumerable:!(o=de(e,s))||o.enumerable});return t},h=(t,e,r)=>(r=t!=null?le(pe(t)):{},me(e||!t||!t.__esModule?Y(r,"default",{value:t,enumerable:!0}):r,t)),V=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,e){function r(o){"@babel/helpers - typeof";return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(o)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),he=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,e){var r=V().default;function o(n,i){if(r(n)!="object"||!n)return n;var u=n[Symbol.toPrimitive];if(u!==void 0){var s=u.call(n,i||"default");if(r(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),ye=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,e){var r=V().default,o=he();function n(i){var u=o(i,"string");return r(u)=="symbol"?u:u+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),P=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,e){var r=ye();function o(n,i,u){return(i=r(i))in n?Object.defineProperty(n,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[i]=u,n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),v=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,e){var r=P();function o(i,u){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);u&&(a=a.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),s.push.apply(s,a)}return s}function n(i){for(var u=1;u<arguments.length;u++){var s=arguments[u]!=null?arguments[u]:{};u%2?o(Object(s),!0).forEach(function(a){r(i,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):o(Object(s)).forEach(function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(s,a))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}});function U(t){return e=>{let r=0,o=null,n=[];function i(){o||(o=e.subscribe({next(s){for(let c of n){var a;(a=c.next)===null||a===void 0||a.call(c,s)}},error(s){for(let c of n){var a;(a=c.error)===null||a===void 0||a.call(c,s)}},complete(){for(let a of n){var s;(s=a.complete)===null||s===void 0||s.call(a)}}}))}function u(){if(r===0&&o){let s=o;o=null,s.unsubscribe()}}return w(s=>(r++,n.push(s),i(),{unsubscribe(){r--,u();let a=n.findIndex(c=>c===s);a>-1&&n.splice(a,1)}}))}}function j(t){let e=t,r=[],o=u=>{e!==void 0&&u.next(e),r.push(u)},n=u=>{r.splice(r.indexOf(u),1)},i=w(u=>(o(u),()=>{n(u)}));return i.next=u=>{if(e!==u){e=u;for(let s of r)s.next(u)}},i.get=()=>e,i}function Q(t){return w(e=>{function r(n=0,i=t.op){let u=t.links[n];if(!u)throw new Error("No more links to execute - did you forget to add an ending link?");return u({op:i,next(a){return r(n+1,a)}})}return r().subscribe(e)})}var E=h(P(),1),O=h(v(),1);function X(t){return t instanceof S}function we(t){return k(t)&&k(t.error)&&typeof t.error.code=="number"&&typeof t.error.message=="string"}function Pe(t,e){return typeof t=="string"?t:k(t)&&typeof t.message=="string"?t.message:e}var S=class q extends Error{constructor(e,r){var o,n;let i=r?.cause;super(e,{cause:i}),(0,E.default)(this,"cause",void 0),(0,E.default)(this,"shape",void 0),(0,E.default)(this,"data",void 0),(0,E.default)(this,"meta",void 0),this.meta=r?.meta,this.cause=i,this.shape=r==null||(o=r.result)===null||o===void 0?void 0:o.error,this.data=r==null||(n=r.result)===null||n===void 0?void 0:n.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,q.prototype)}static from(e,r={}){let o=e;return X(o)?(r.meta&&(o.meta=(0,O.default)((0,O.default)({},o.meta),r.meta)),o):we(o)?new q(o.error.message,(0,O.default)((0,O.default)({},r),{},{result:o})):new q(Pe(o,"Unknown error"),(0,O.default)((0,O.default)({},r),{},{cause:o}))}};function M(t){let e=t;return e?"input"in e?e:{input:e,output:e}:{input:{serialize:r=>r,deserialize:r=>r},output:{serialize:r=>r,deserialize:r=>r}}}var Z=t=>typeof t=="function";function ee(t){if(t)return t;if(typeof window<"u"&&Z(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Z(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var C=h(v(),1);function L(t){return{url:t.url.toString(),fetch:t.fetch,transformer:M(t.transformer),methodOverride:t.methodOverride}}function Se(t){let e={};for(let r=0;r<t.length;r++){let o=t[r];e[r]=o}return e}var _e={query:"GET",mutation:"POST",subscription:"PATCH"};function te(t){return"input"in t?t.transformer.input.serialize(t.input):Se(t.inputs.map(e=>t.transformer.input.serialize(e)))}var T=t=>{let e=t.url.split("?"),o=e[0].replace(/\/$/,"")+"/"+t.path,n=[];if(e[1]&&n.push(e[1]),"inputs"in t&&n.push("batch=1"),t.type==="query"||t.type==="subscription"){let i=te(t);i!==void 0&&t.methodOverride!=="POST"&&n.push(`input=${encodeURIComponent(JSON.stringify(i))}`)}return n.length&&(o+="?"+n.join("&")),o},re=t=>{if(t.type==="query"&&t.methodOverride!=="POST")return;let e=te(t);return e!==void 0?JSON.stringify(e):void 0},W=t=>oe((0,C.default)((0,C.default)({},t),{},{contentTypeHeader:"application/json",getUrl:T,getBody:re})),Oe=class extends Error{constructor(){let t="AbortError";super(t),this.name=t,this.message=t}},ke=t=>{var e;if(t?.aborted)throw(e=t.throwIfAborted)===null||e===void 0||e.call(t),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new Oe};async function ne(t){var e;ke(t.signal);let r=t.getUrl(t),o=t.getBody(t),n=(e=t.methodOverride)!==null&&e!==void 0?e:_e[t.type],i=await(async()=>{let s=await t.headers();return Symbol.iterator in s?Object.fromEntries(s):s})(),u=(0,C.default)((0,C.default)((0,C.default)({},t.contentTypeHeader&&n!=="GET"?{"content-type":t.contentTypeHeader}:{}),t.trpcAcceptHeader?{"trpc-accept":t.trpcAcceptHeader}:void 0),i);return ee(t.fetch)(r,{method:n,signal:t.signal,body:o,headers:u})}async function oe(t){let e={},r=await ne(t);e.response=r;let o=await r.json();return e.responseJSON=o,{json:o,meta:e}}var Vt=h(v(),1);var ie=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function F(t){let e=null,r=null,o=()=>{clearTimeout(r),r=null,e=null};function n(s){let a=[[]],c=0;for(;;){let f=s[c];if(!f)break;let p=a[a.length-1];if(f.aborted){var m;(m=f.reject)===null||m===void 0||m.call(f,new Error("Aborted")),c++;continue}if(t.validate(p.concat(f).map(d=>d.key))){p.push(f),c++;continue}if(p.length===0){var l;(l=f.reject)===null||l===void 0||l.call(f,new Error("Input is too big for a single dispatch")),c++;continue}a.push([])}return a}function i(){let s=n(e);o();for(let a of s){if(!a.length)continue;let c={items:a};for(let l of a)l.batch=c;t.fetch(c.items.map(l=>l.key)).then(async l=>{await Promise.all(l.map(async(p,y)=>{let d=c.items[y];try{var b;let g=await Promise.resolve(p);(b=d.resolve)===null||b===void 0||b.call(d,g)}catch(g){var R;(R=d.reject)===null||R===void 0||R.call(d,g)}d.batch=null,d.reject=null,d.resolve=null}));for(let p of c.items){var f;(f=p.reject)===null||f===void 0||f.call(p,new Error("Missing result")),p.batch=null}}).catch(l=>{for(let p of c.items){var f;(f=p.reject)===null||f===void 0||f.call(p,l),p.batch=null}})}}function u(s){var a;let c={aborted:!1,key:s,batch:null,resolve:ie,reject:ie},m=new Promise((l,f)=>{var p;c.reject=f,c.resolve=l,(p=e)!==null&&p!==void 0||(e=[]),e.push(c)});return(a=r)!==null&&a!==void 0||(r=setTimeout(i)),m}return{load:u}}function se(...t){let e=new AbortController,r=t.length,o=0,n=()=>{++o===r&&e.abort()};for(let i of t)i?.aborted?n():i?.addEventListener("abort",n,{once:!0});return e.signal}var A=h(v(),1);function z(t){var e,r;let o=L(t),n=(e=t.maxURLLength)!==null&&e!==void 0?e:1/0,i=(r=t.maxItems)!==null&&r!==void 0?r:1/0;return()=>{let u=m=>({validate(l){if(n===1/0&&i===1/0)return!0;if(l.length>i)return!1;let f=l.map(d=>d.path).join(","),p=l.map(d=>d.input);return T((0,A.default)((0,A.default)({},o),{},{type:m,path:f,inputs:p,signal:null})).length<=n},async fetch(l){let f=l.map(g=>g.path).join(","),p=l.map(g=>g.input),y=se(...l.map(g=>g.signal)),d=await W((0,A.default)((0,A.default)({},o),{},{path:f,inputs:p,type:m,headers(){return t.headers?typeof t.headers=="function"?t.headers({opList:l}):t.headers:{}},signal:y}));return(Array.isArray(d.json)?d.json:l.map(()=>d.json)).map(g=>({meta:d.meta,json:g}))}}),s=F(u("query")),a=F(u("mutation")),c={query:s,mutation:a};return({op:m})=>w(l=>{if(m.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let p=c[m.type].load(m),y;return p.then(d=>{y=d;let b=B(d.json,o.transformer.output);if(!b.ok){l.error(S.from(b.error,{meta:d.meta}));return}l.next({context:d.meta,result:b.result}),l.complete()}).catch(d=>{l.error(S.from(d,{meta:y?.meta}))}),()=>{}})}}var ir=h(v(),1);var G=(t,...e)=>typeof t=="function"?t(...e):t,dr=h(P(),1);function Ce(){let t,e;return{promise:new Promise((o,n)=>{t=o,e=n}),resolve:t,reject:e}}async function Te(t){let e=await G(t.url);if(!t.connectionParams)return e;let o=`${e.includes("?")?"&":"?"}connectionParams=1`;return e+o}async function Re(t){let e={method:"connectionParams",data:await G(t)};return JSON.stringify(e)}var pr=h(P(),1);var _=h(P(),1);function je(t){let{promise:e,resolve:r,reject:o}=Ce();return t.addEventListener("open",()=>{t.removeEventListener("error",o),r()}),t.addEventListener("error",o),e}function Ee(t,{intervalMs:e,pongTimeoutMs:r}){let o,n;function i(){o=setTimeout(()=>{t.send("PING"),n=setTimeout(()=>{t.close()},r)},e)}function u(){clearTimeout(o),i()}function s(){clearTimeout(n),u()}t.addEventListener("open",i),t.addEventListener("message",({data:a})=>{clearTimeout(o),i(),a==="PONG"&&s()}),t.addEventListener("close",()=>{clearTimeout(o),clearTimeout(n)})}var qe=class H{constructor(e){var r;if((0,_.default)(this,"id",++H.connectCount),(0,_.default)(this,"WebSocketPonyfill",void 0),(0,_.default)(this,"urlOptions",void 0),(0,_.default)(this,"keepAliveOpts",void 0),(0,_.default)(this,"wsObservable",j(null)),(0,_.default)(this,"openPromise",null),this.WebSocketPonyfill=(r=e.WebSocketPonyfill)!==null&&r!==void 0?r:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=e.urlOptions,this.keepAliveOpts=e.keepAlive}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var e=this;if(e.openPromise)return e.openPromise;e.id=++H.connectCount;let r=Te(e.urlOptions).then(o=>new e.WebSocketPonyfill(o));e.openPromise=r.then(async o=>{e.ws=o,o.addEventListener("message",function({data:n}){n==="PING"&&this.send("PONG")}),e.keepAliveOpts.enabled&&Ee(o,e.keepAliveOpts),o.addEventListener("close",()=>{e.ws===o&&(e.ws=null)}),await je(o),e.urlOptions.connectionParams&&o.send(await Re(e.urlOptions.connectionParams))});try{await e.openPromise}finally{e.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var r;(r=e.ws)===null||r===void 0||r.close()}}};(0,_.default)(qe,"connectCount",0);var fr=h(P(),1),mr=h(v(),1);var J=h(P(),1),ae=h(v(),1),Me=class{constructor(t){(0,J.default)(this,"links",void 0),(0,J.default)(this,"runtime",void 0),(0,J.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=t.links.map(e=>e(this.runtime))}$request(t){var e;return Q({links:this.links,op:(0,ae.default)((0,ae.default)({},t),{},{context:(e=t.context)!==null&&e!==void 0?e:{},id:++this.requestId})}).pipe(U())}async requestAsPromise(t){var e=this;try{let r=e.$request(t);return(await N(r)).result.data}catch(r){throw S.from(r)}}query(t,e,r){return this.requestAsPromise({type:"query",path:t,input:e,context:r?.context,signal:r?.signal})}mutation(t,e,r){return this.requestAsPromise({type:"mutation",path:t,input:e,context:r?.context,signal:r?.signal})}subscription(t,e,r){return this.$request({type:"subscription",path:t,input:e,context:r.context,signal:r.signal}).subscribe({next(n){switch(n.result.type){case"state":{var i;(i=r.onConnectionStateChange)===null||i===void 0||i.call(r,n.result);break}case"started":{var u;(u=r.onStarted)===null||u===void 0||u.call(r,{context:n.context});break}case"stopped":{var s;(s=r.onStopped)===null||s===void 0||s.call(r);break}case"data":case void 0:{var a;(a=r.onData)===null||a===void 0||a.call(r,n.result.data);break}}},error(n){var i;(i=r.onError)===null||i===void 0||i.call(r,n)},complete(){var n;(n=r.onComplete)===null||n===void 0||n.call(r)}})}};var Le=Symbol.for("trpc_untypedClient"),Ae={query:"query",mutate:"mutation",subscribe:"subscription"},Ie=t=>Ae[t];function De(t){let e=I(({path:r,args:o})=>{let n=[...r],i=Ie(n.pop()),u=n.join(".");return t[i](u,...o)});return D(r=>r===Le?t:e[r])}function ue(t){let e=new Me(t);return De(e)}var Fr=h(v(),1);var zr=h(v(),1);var Be=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,e){function r(n){var i,u,s,a=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,s=Symbol.iterator);a--;){if(u&&(i=n[u])!=null)return i.call(n);if(s&&(i=n[s])!=null)return new o(i.call(n));u="@@asyncIterator",s="@@iterator"}throw new TypeError("Object is not async iterable")}function o(n){function i(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var s=u.done;return Promise.resolve(u.value).then(function(a){return{value:a,done:s}})}return o=function(s){this.s=s,this.n=s.next},o.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(s){var a=this.s.return;return a===void 0?Promise.resolve({value:s,done:!0}):i(a.apply(this.s,arguments))},throw:function(s){var a=this.s.return;return a===void 0?Promise.reject(s):i(a.apply(this.s,arguments))}},new o(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),Hr=h(Be(),1);var Gr=h(v(),1);var Ne=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(t,e){function r(){var o=typeof SuppressedError=="function"?SuppressedError:function(s,a){var c=Error();return c.name="SuppressedError",c.error=s,c.suppressed=a,c},n={},i=[];function u(s,a){if(a!=null){if(Object(a)!==a)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(s)var c=a[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(c===void 0&&(c=a[Symbol.dispose||Symbol.for("Symbol.dispose")],s))var m=c;if(typeof c!="function")throw new TypeError("Object is not disposable.");m&&(c=function(){try{m.call(a)}catch(f){return Promise.reject(f)}}),i.push({v:a,d:c,a:s})}else s&&i.push({d:a,a:s});return a}return{e:n,u:u.bind(null,!1),a:u.bind(null,!0),d:function(){var a,c=this.e,m=0;function l(){for(;a=i.pop();)try{if(!a.a&&m===1)return m=0,i.push(a),Promise.resolve().then(l);if(a.d){var p=a.d.call(a.v);if(a.a)return m|=2,Promise.resolve(p).then(l,f)}else m|=1}catch(y){return f(y)}if(m===1)return c!==n?Promise.reject(c):Promise.resolve();if(c!==n)throw c}function f(p){return c=c!==n?new o(p,c):p,l()}return l()}}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),ce=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(t,e){function r(o,n){this.v=o,this.k=n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),Ue=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(t,e){var r=ce();function o(n){return new r(n,0)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),We=x({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(t,e){var r=ce();function o(i){return function(){return new n(i.apply(this,arguments))}}function n(i){var u,s;function a(m,l){try{var f=i[m](l),p=f.value,y=p instanceof r;Promise.resolve(y?p.v:p).then(function(d){if(y){var b=m==="return"?"return":"next";if(!p.k||d.done)return a(b,d);d=i[b](d).value}c(f.done?"return":"normal",d)},function(d){a("throw",d)})}catch(d){c("throw",d)}}function c(m,l){switch(m){case"return":u.resolve({value:l,done:!0});break;case"throw":u.reject(l);break;default:u.resolve({value:l,done:!1})}(u=u.next)?a(u.key,u.arg):s=null}this._invoke=function(m,l){return new Promise(function(f,p){var y={key:m,arg:l,resolve:f,reject:p,next:null};s?s=s.next=y:(u=s=y,a(m,l))})},typeof i.return!="function"&&(this.return=void 0)}n.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},n.prototype.next=function(i){return this._invoke("next",i)},n.prototype.throw=function(i){return this._invoke("throw",i)},n.prototype.return=function(i){return this._invoke("return",i)},e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),Jr=h(Ne(),1),$r=h(Ue(),1),Yr=h(We(),1),Kr=h(v(),1);var Fe="https://rpc.dogeapi.io";function en(t={}){let{url:e=Fe,...r}=t;return ue({links:[z({...r,url:e,transformer:$})]})}export{Fe as DEFAULT_TRPC_URL,en as createDogecoinCoreClient};
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
@trpc/client/dist/httpBatchLink-BOe5aCcR.mjs:
|
|
5
|
-
(* istanbul ignore if -- @preserve *)
|
|
6
|
-
*/
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,d as S}from"./chunk-Z4KAWBXZ.js";import{a as _,b as E}from"./chunk-FH72CRD7.js";import{f as l,j as u,o as f,p as b,q as p,r as y,s as g}from"./chunk-OP2QDE6K.js";import{IncomingMessage as x}from"http";function C(e,r){if("body"in e)return e.body===void 0?void 0:typeof e.body=="string"||e.body instanceof x?e.body:JSON.stringify(e.body);let t=0,n=!1;return new ReadableStream({start(o){let i=s=>{if(t+=s.length,!r.maxBodySize||t<=r.maxBodySize){o.enqueue(new Uint8Array(s.buffer,s.byteOffset,s.byteLength));return}o.error(new y({code:"PAYLOAD_TOO_LARGE"})),n=!0,e.off("data",i),e.off("end",a)},a=()=>{n||(n=!0,e.off("data",i),e.off("end",a),o.close())};e.on("data",i),e.on("end",a)},cancel(){e.destroy()}})}function h(e){try{var r,t;let n=e.headers[":scheme"]&&e.headers[":scheme"]==="https"||e.socket&&"encrypted"in e.socket&&e.socket.encrypted?"https:":"http:",o=(r=(t=e.headers.host)!==null&&t!==void 0?t:e.headers[":authority"])!==null&&r!==void 0?r:"localhost";return new URL(e.url,`${n}//${o}`)}catch(n){throw new y({code:"BAD_REQUEST",message:"Invalid URL",cause:n})}}function A(e){let r=new Headers;for(let t in e){let n=e[t];if(!(typeof t=="string"&&t.startsWith(":")))if(Array.isArray(n))for(let o of n)r.append(t,o);else n!=null&&r.append(t,n)}return r}function B(e,r,t){let n=new AbortController,o=()=>{r.off("close",o),e.off("aborted",o),n.abort()};r.once("close",o),e.once("aborted",o);let i=h(e),a={headers:A(e.headers),method:e.method,signal:n.signal};return e.method!=="GET"&&e.method!=="HEAD"&&(a.body=C(e,t),a.duplex="half"),new Request(i,a)}async function L(e,r){e.write(r)===!1&&await new Promise((t,n)=>{let o=s=>{n(s),a()},i=()=>{t(),a()},a=()=>{e.off("error",o),e.off("drain",i)};e.once("error",o),e.once("drain",i)})}async function O(e){let{res:r}=e;try{let t=new WritableStream({async write(n){var o;await L(r,n),(o=r.flush)===null||o===void 0||o.call(r)}});await e.body.pipeTo(t,{signal:e.signal})}catch(t){if(R(t))return;throw t}}async function U(e){let{response:r,rawResponse:t}=e;t.statusCode===200&&(t.statusCode=r.status);for(let[n,o]of r.headers)t.setHeader(n,o);try{r.body&&await O({res:t,signal:e.request.signal,body:r.body})}catch(n){throw t.headersSent||(t.statusCode=500),n}finally{t.end()}}var c=u(f(),1);function v(e){return r=>{var t;let{res:n,req:o}=e,i=p(r),a=b({config:e.router._def._config,error:i,type:"unknown",path:void 0,input:void 0,ctx:void 0});(t=e.onError)===null||t===void 0||t.call(e,{req:o,error:i,type:"unknown",path:void 0,input:void 0,ctx:void 0});let s=g(e.router._def._config,{error:a});n.statusCode=a.data.httpStatus,n.end(JSON.stringify(s))}}async function T(e){return new Promise(r=>{var t;let n=(t=e.middleware)!==null&&t!==void 0?t:(o,i,a)=>a();return e.res.once("finish",()=>{r()}),n(e.req,e.res,o=>{l(async()=>{var i;let a=B(e.req,e.res,{maxBodySize:(i=e.maxBodySize)!==null&&i!==void 0?i:null}),s=async m=>{var d;return await((d=e.createContext)===null||d===void 0?void 0:d.call(e,(0,c.default)((0,c.default)({},e),m)))},P=await S((0,c.default)((0,c.default)({},e),{},{req:a,error:o?p(o):null,createContext:s,onError(m){var d;e==null||(d=e.onError)===null||d===void 0||d.call(e,(0,c.default)((0,c.default)({},m),{},{req:e.req}))}}));await U({request:a,response:P,rawResponse:e.res})}).catch(v(e))})})}import $ from"http";var w=u(f(),1);function k(e){var r;let n=((r=e.basePath)!==null&&r!==void 0?r:"/").length;return(o,i)=>{let a="";l(async()=>{a=h(o).pathname.slice(n),await T((0,w.default)((0,w.default)({},e),{},{req:o,res:i,path:a}))}).catch(v((0,w.default)({req:o,res:i,path:a},e)))}}function z(e){return k(e)}function H(e){return $.createServer(z(e))}var D=H({router:E,onError:_.NODE_ENV==="development"?({path:e,error:r})=>{console.error(`\u274C tRPC failed on ${e??"<no-path>"}: ${r.message}`)}:void 0});D.listen(3e3);
|