1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77 |
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
x3
|
|
//export { Buffer as StreamBuffer } from '@std/streams';
export { ok, throws, rejects, deepStrictEqual as equal } from 'node:assert';
export type { Buffer } from 'node:buffer';
export { setImmediate, } from 'node:timers';
export { tmpdir } from 'node:os';
export { stdout, stderr, argv, env, cwd as getCwd, exit } from 'node:process';
export { fileURLToPath } from 'node:url';
export { join as joinPath
, resolve as resolvePath
, relative as relativePath } from 'node:path';
export { realpathSync } from 'node:fs';
export { writeFile, mkdir, mkdtemp, rm } from 'node:fs/promises';
export { Server as HttpServer
, createServer as createHttpServer } from 'node:http';
export { Server as TcpServer
, Socket
, createServer as createTcpServer
, createConnection } from 'node:net';
export { inspect, stripVTControlCharacters } from 'node:util';
export { spawn as spawnImpl } from 'node:child_process';
export type { ChildProcess } from 'node:child_process';
export { webcrypto } from 'node:crypto';
import { execFile } from 'node:child_process';
import { promisify } from 'node:util';
export const execImpl = promisify(execFile);
export { execFile };
export const {
connect: denoConnect,
listen: denoListen,
watchFs,
} = globalThis.Deno || {};
export type TcpConn = Deno.TcpConn;
export { base16, base64, bech32, bech32m } from '@scure/base'
export { default as Case } from 'case';
export { createLogUpdate } from 'log-update';
//export { sha256 } from '@noble/hashes/sha2.js'
//export { ripemd160 } from '@noble/hashes/legacy.js'
//export { ed25519 } from '@noble/ed25519'
//export { secp256k1 } from '@noble/secp256k1'
//export {
//numberToBytesBE as toBE,
//numberToBytesLE as toLE,
//} from '@noble/curves/abstract/utils'
//export * as bip32 from '@scure/bip32'
//export * as bip39 from '@scure/bip39'
//export { wordlist as bip39_EN } from '@scure/bip39/wordlists/english'
if (globalThis.Deno) {
await import("https://deno.land/x/indexeddb@v1.1.0/polyfill_memory.ts");
}
//export * as ZMQ from 'npm:zeromq';
export { default as Indexd } from 'indexd';
export { BrowserLevel as DB } from 'browser-level';
export * as BTCJS from 'bitcoinjs-lib';
export { uint32 } from 'protobuf-varint';
/** A parse that may fail but the source and error must still be preserved. */
export type TryToParse<T, U> =
| [T, U, undefined]
| [T, undefined, unknown];
/** Show a stringified object. */
export const tryToParse = <T, U>(src: T): TryToParse<T, U> => {
try {
const json = JSON.parse(src as string)
return [src, json, undefined]
} catch (e) {
return [src, undefined, e]
}
};
|