viem 2.4.0 → 2.5.0

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.
Files changed (111) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/_cjs/chains/definitions/blastSepolia.js +26 -0
  3. package/_cjs/chains/definitions/blastSepolia.js.map +1 -0
  4. package/_cjs/chains/index.js +6 -4
  5. package/_cjs/chains/index.js.map +1 -1
  6. package/_cjs/clients/transports/http.js +8 -5
  7. package/_cjs/clients/transports/http.js.map +1 -1
  8. package/_cjs/clients/transports/ipc.js +77 -0
  9. package/_cjs/clients/transports/ipc.js.map +1 -0
  10. package/_cjs/clients/transports/webSocket.js +11 -7
  11. package/_cjs/clients/transports/webSocket.js.map +1 -1
  12. package/_cjs/errors/version.js +1 -1
  13. package/_cjs/node/index.js +8 -0
  14. package/_cjs/node/index.js.map +1 -0
  15. package/_cjs/utils/index.js +13 -6
  16. package/_cjs/utils/index.js.map +1 -1
  17. package/_cjs/utils/rpc/compat.js +35 -0
  18. package/_cjs/utils/rpc/compat.js.map +1 -0
  19. package/_cjs/utils/rpc/http.js +74 -0
  20. package/_cjs/utils/rpc/http.js.map +1 -0
  21. package/_cjs/utils/rpc/id.js +17 -0
  22. package/_cjs/utils/rpc/id.js.map +1 -0
  23. package/_cjs/utils/rpc/ipc.js +75 -0
  24. package/_cjs/utils/rpc/ipc.js.map +1 -0
  25. package/_cjs/utils/rpc/socket.js +85 -0
  26. package/_cjs/utils/rpc/socket.js.map +1 -0
  27. package/_cjs/utils/rpc/webSocket.js +50 -0
  28. package/_cjs/utils/rpc/webSocket.js.map +1 -0
  29. package/_esm/chains/definitions/blastSepolia.js +23 -0
  30. package/_esm/chains/definitions/blastSepolia.js.map +1 -0
  31. package/_esm/chains/index.js +1 -0
  32. package/_esm/chains/index.js.map +1 -1
  33. package/_esm/clients/transports/http.js +8 -5
  34. package/_esm/clients/transports/http.js.map +1 -1
  35. package/_esm/clients/transports/ipc.js +77 -0
  36. package/_esm/clients/transports/ipc.js.map +1 -0
  37. package/_esm/clients/transports/webSocket.js +10 -6
  38. package/_esm/clients/transports/webSocket.js.map +1 -1
  39. package/_esm/errors/version.js +1 -1
  40. package/_esm/node/index.js +3 -0
  41. package/_esm/node/index.js.map +1 -0
  42. package/_esm/utils/index.js +4 -1
  43. package/_esm/utils/index.js.map +1 -1
  44. package/_esm/utils/rpc/compat.js +86 -0
  45. package/_esm/utils/rpc/compat.js.map +1 -0
  46. package/_esm/utils/rpc/http.js +70 -0
  47. package/_esm/utils/rpc/http.js.map +1 -0
  48. package/_esm/utils/rpc/id.js +13 -0
  49. package/_esm/utils/rpc/id.js.map +1 -0
  50. package/_esm/utils/rpc/ipc.js +71 -0
  51. package/_esm/utils/rpc/ipc.js.map +1 -0
  52. package/_esm/utils/rpc/socket.js +90 -0
  53. package/_esm/utils/rpc/socket.js.map +1 -0
  54. package/_esm/utils/rpc/webSocket.js +48 -0
  55. package/_esm/utils/rpc/webSocket.js.map +1 -0
  56. package/_types/chains/definitions/blastSepolia.d.ts +34 -0
  57. package/_types/chains/definitions/blastSepolia.d.ts.map +1 -0
  58. package/_types/chains/index.d.ts +1 -0
  59. package/_types/chains/index.d.ts.map +1 -1
  60. package/_types/clients/transports/http.d.ts +2 -2
  61. package/_types/clients/transports/http.d.ts.map +1 -1
  62. package/_types/clients/transports/ipc.d.ts +46 -0
  63. package/_types/clients/transports/ipc.d.ts.map +1 -0
  64. package/_types/clients/transports/webSocket.d.ts +6 -1
  65. package/_types/clients/transports/webSocket.d.ts.map +1 -1
  66. package/_types/errors/version.d.ts +1 -1
  67. package/_types/node/index.d.ts +3 -0
  68. package/_types/node/index.d.ts.map +1 -0
  69. package/_types/types/rpc.d.ts +35 -0
  70. package/_types/types/rpc.d.ts.map +1 -1
  71. package/_types/utils/buildRequest.d.ts +2 -2
  72. package/_types/utils/buildRequest.d.ts.map +1 -1
  73. package/_types/utils/index.d.ts +4 -1
  74. package/_types/utils/index.d.ts.map +1 -1
  75. package/_types/utils/rpc/compat.d.ts +78 -0
  76. package/_types/utils/rpc/compat.d.ts.map +1 -0
  77. package/_types/utils/rpc/http.d.ts +20 -0
  78. package/_types/utils/rpc/http.d.ts.map +1 -0
  79. package/_types/utils/rpc/id.d.ts +11 -0
  80. package/_types/utils/rpc/id.d.ts.map +1 -0
  81. package/_types/utils/rpc/ipc.d.ts +8 -0
  82. package/_types/utils/rpc/ipc.d.ts.map +1 -0
  83. package/_types/utils/rpc/socket.d.ts +45 -0
  84. package/_types/utils/rpc/socket.d.ts.map +1 -0
  85. package/_types/utils/rpc/webSocket.d.ts +3 -0
  86. package/_types/utils/rpc/webSocket.d.ts.map +1 -0
  87. package/chains/definitions/blastSepolia.ts +23 -0
  88. package/chains/index.ts +1 -0
  89. package/clients/transports/http.ts +15 -6
  90. package/clients/transports/ipc.ts +144 -0
  91. package/clients/transports/webSocket.ts +16 -6
  92. package/errors/version.ts +1 -1
  93. package/node/index.ts +11 -0
  94. package/node/package.json +6 -0
  95. package/package.json +9 -1
  96. package/types/rpc.ts +44 -0
  97. package/utils/buildRequest.ts +2 -2
  98. package/utils/index.ts +19 -8
  99. package/utils/rpc/compat.ts +117 -0
  100. package/utils/rpc/http.ts +132 -0
  101. package/utils/rpc/id.ts +13 -0
  102. package/utils/rpc/ipc.ts +89 -0
  103. package/utils/rpc/socket.ts +162 -0
  104. package/utils/rpc/webSocket.ts +63 -0
  105. package/_cjs/utils/rpc.js +0 -154
  106. package/_cjs/utils/rpc.js.map +0 -1
  107. package/_esm/utils/rpc.js +0 -160
  108. package/_esm/utils/rpc.js.map +0 -1
  109. package/_types/utils/rpc.d.ts +0 -80
  110. package/_types/utils/rpc.d.ts.map +0 -1
  111. package/utils/rpc.ts +0 -318
@@ -0,0 +1,86 @@
1
+ // TODO(v3): This file is here for backwards compatibility, and to prevent breaking changes.
2
+ // These APIs will be removed in v3.
3
+ /* c8 ignore start */
4
+ import { WebSocketRequestError, } from '../../errors/request.js';
5
+ import {} from '../promise/withTimeout.js';
6
+ import { getHttpRpcClient } from './http.js';
7
+ import {} from './socket.js';
8
+ import { getWebSocketRpcClient } from './webSocket.js';
9
+ function webSocket(socketClient, { body, onError, onResponse }) {
10
+ socketClient.request({
11
+ body,
12
+ onError,
13
+ onResponse,
14
+ });
15
+ return socketClient;
16
+ }
17
+ async function webSocketAsync(socketClient, { body, timeout = 10000 }) {
18
+ return socketClient.requestAsync({
19
+ body,
20
+ timeout,
21
+ });
22
+ }
23
+ /**
24
+ * @deprecated use `getSocketClient` instead.
25
+ *
26
+ * ```diff
27
+ * -import { getSocket } from 'viem/utils'
28
+ * +import { getSocketClient } from 'viem/utils'
29
+ *
30
+ * -const socket = await getSocket(url)
31
+ * +const socketClient = await getSocketClient(url)
32
+ * +const socket = socketClient.socket
33
+ * ```
34
+ */
35
+ export async function getSocket(url) {
36
+ const client = await getWebSocketRpcClient(url);
37
+ return Object.assign(client.socket, {
38
+ requests: client.requests,
39
+ subscriptions: client.subscriptions,
40
+ });
41
+ }
42
+ export const rpc = {
43
+ /**
44
+ * @deprecated use `getHttpRpcClient` instead.
45
+ *
46
+ * ```diff
47
+ * -import { rpc } from 'viem/utils'
48
+ * +import { getHttpRpcClient } from 'viem/utils'
49
+ *
50
+ * -rpc.http(url, params)
51
+ * +const httpClient = getHttpRpcClient(url)
52
+ * +httpClient.request(params)
53
+ * ```
54
+ */
55
+ http(url, params) {
56
+ return getHttpRpcClient(url).request(params);
57
+ },
58
+ /**
59
+ * @deprecated use `getWebSocketRpcClient` instead.
60
+ *
61
+ * ```diff
62
+ * -import { rpc } from 'viem/utils'
63
+ * +import { getWebSocketRpcClient } from 'viem/utils'
64
+ *
65
+ * -rpc.webSocket(url, params)
66
+ * +const webSocketClient = getWebSocketRpcClient(url)
67
+ * +webSocketClient.request(params)
68
+ * ```
69
+ */
70
+ webSocket,
71
+ /**
72
+ * @deprecated use `getWebSocketRpcClient` instead.
73
+ *
74
+ * ```diff
75
+ * -import { rpc } from 'viem/utils'
76
+ * +import { getWebSocketRpcClient } from 'viem/utils'
77
+ *
78
+ * -const response = await rpc.webSocketAsync(url, params)
79
+ * +const webSocketClient = getWebSocketRpcClient(url)
80
+ * +const response = await webSocketClient.requestAsync(params)
81
+ * ```
82
+ */
83
+ webSocketAsync,
84
+ };
85
+ /* c8 ignore end */
86
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../utils/rpc/compat.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,oCAAoC;AAEpC,qBAAqB;AACrB,OAAO,EAEL,qBAAqB,GACtB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAA6B,MAAM,2BAA2B,CAAA;AACrE,OAAO,EAA8B,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAwB,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAQtD,SAAS,SAAS,CAChB,YAAwC,EACxC,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAoB;IAE/C,YAAY,CAAC,OAAO,CAAC;QACnB,IAAI;QACJ,OAAO;QACP,UAAU;KACX,CAAC,CAAA;IACF,OAAO,YAAY,CAAA;AACrB,CAAC;AAYD,KAAK,UAAU,cAAc,CAC3B,YAAwC,EACxC,EAAE,IAAI,EAAE,OAAO,GAAG,KAAM,EAAyB;IAEjD,OAAO,YAAY,CAAC,YAAY,CAAC;QAC/B,IAAI;QACJ,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,GAAW;IACzC,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,GAAG,CAAC,CAAA;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,GAAW,EAAE,MAA6B;QAC7C,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9C,CAAC;IACD;;;;;;;;;;;OAWG;IACH,SAAS;IACT;;;;;;;;;;;OAWG;IACH,cAAc;CACf,CAAA;AACD,mBAAmB"}
@@ -0,0 +1,70 @@
1
+ import { HttpRequestError, TimeoutError, } from '../../errors/request.js';
2
+ import { withTimeout, } from '../promise/withTimeout.js';
3
+ import { stringify } from '../stringify.js';
4
+ import { idCache } from './id.js';
5
+ export function getHttpRpcClient(url, options = {}) {
6
+ return {
7
+ async request(params) {
8
+ const { body, fetchOptions = {}, timeout = options.timeout ?? 10000, } = params;
9
+ const { headers, method, signal: signal_, } = { ...options.fetchOptions, ...fetchOptions };
10
+ try {
11
+ const response = await withTimeout(async ({ signal }) => {
12
+ const response = await fetch(url, {
13
+ ...fetchOptions,
14
+ body: Array.isArray(body)
15
+ ? stringify(body.map((body) => ({
16
+ jsonrpc: '2.0',
17
+ id: body.id ?? idCache.take(),
18
+ ...body,
19
+ })))
20
+ : stringify({
21
+ jsonrpc: '2.0',
22
+ id: body.id ?? idCache.take(),
23
+ ...body,
24
+ }),
25
+ headers: {
26
+ ...headers,
27
+ 'Content-Type': 'application/json',
28
+ },
29
+ method: method || 'POST',
30
+ signal: signal_ || (timeout > 0 ? signal : undefined),
31
+ });
32
+ return response;
33
+ }, {
34
+ errorInstance: new TimeoutError({ body, url }),
35
+ timeout,
36
+ signal: true,
37
+ });
38
+ let data;
39
+ if (response.headers.get('Content-Type')?.startsWith('application/json')) {
40
+ data = await response.json();
41
+ }
42
+ else {
43
+ data = await response.text();
44
+ }
45
+ if (!response.ok) {
46
+ throw new HttpRequestError({
47
+ body,
48
+ details: stringify(data.error) || response.statusText,
49
+ headers: response.headers,
50
+ status: response.status,
51
+ url,
52
+ });
53
+ }
54
+ return data;
55
+ }
56
+ catch (err) {
57
+ if (err instanceof HttpRequestError)
58
+ throw err;
59
+ if (err instanceof TimeoutError)
60
+ throw err;
61
+ throw new HttpRequestError({
62
+ body,
63
+ details: err.message,
64
+ url,
65
+ });
66
+ }
67
+ },
68
+ };
69
+ }
70
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../../../utils/rpc/http.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,YAAY,GAEb,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAEL,WAAW,GACZ,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAoCjC,MAAM,UAAU,gBAAgB,CAC9B,GAAW,EACX,UAAgC,EAAE;IAElC,OAAO;QACL,KAAK,CAAC,OAAO,CAAC,MAAM;YAClB,MAAM,EACJ,IAAI,EACJ,YAAY,GAAG,EAAE,EACjB,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAM,GACpC,GAAG,MAAM,CAAA;YACV,MAAM,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EAAE,OAAO,GAChB,GAAG,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,YAAY,EAAE,CAAA;YAEhD,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,WAAW,CAChC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;oBACnB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;wBAChC,GAAG,YAAY;wBACf,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;4BACvB,CAAC,CAAC,SAAS,CACP,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CA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,MAAM;wBACvB,GAAG;qBACJ,CAAC,CAAA;gBACJ,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,GAAG,YAAY,gBAAgB;oBAAE,MAAM,GAAG,CAAA;gBAC9C,IAAI,GAAG,YAAY,YAAY;oBAAE,MAAM,GAAG,CAAA;gBAC1C,MAAM,IAAI,gBAAgB,CAAC;oBACzB,IAAI;oBACJ,OAAO,EAAG,GAAa,CAAC,OAAO;oBAC/B,GAAG;iBACJ,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ export function createIdStore() {
2
+ return {
3
+ current: 0,
4
+ take() {
5
+ return this.current++;
6
+ },
7
+ reset() {
8
+ this.current = 0;
9
+ },
10
+ };
11
+ }
12
+ export const idCache = /*#__PURE__*/ createIdStore();
13
+ //# sourceMappingURL=id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.js","sourceRoot":"","sources":["../../../utils/rpc/id.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL,OAAO,EAAE,CAAC;QACV,IAAI;YACF,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;QACvB,CAAC;QACD,KAAK;YACH,IAAI,CAAC,OAAO,GAAG,CAAC,CAAA;QAClB,CAAC;KACF,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,aAAa,EAAE,CAAA"}
@@ -0,0 +1,71 @@
1
+ import { connect } from 'node:net';
2
+ import { WebSocketRequestError } from '../../index.js';
3
+ import { getSocketRpcClient, } from './socket.js';
4
+ const openingBrace = '{'.charCodeAt(0);
5
+ const closingBrace = '}'.charCodeAt(0);
6
+ export function extractMessages(buffer) {
7
+ const messages = [];
8
+ let cursor = 0;
9
+ let level = 0;
10
+ for (let i = 0; i < buffer.length; i++) {
11
+ if (buffer[i] === openingBrace)
12
+ level++;
13
+ if (buffer[i] === closingBrace)
14
+ level--;
15
+ if (level === 0) {
16
+ const message = buffer.subarray(cursor, i + 1);
17
+ if (message[0] === openingBrace &&
18
+ message[message.length - 1] === closingBrace)
19
+ messages.push(message);
20
+ cursor = i + 1;
21
+ }
22
+ }
23
+ return [messages, buffer.subarray(cursor)];
24
+ }
25
+ export async function getIpcRpcClient(path) {
26
+ return getSocketRpcClient({
27
+ async getSocket({ onResponse }) {
28
+ const socket = connect(path);
29
+ function onClose() {
30
+ socket.off('close', onClose);
31
+ socket.off('message', onData);
32
+ }
33
+ let lastRemaining = Buffer.alloc(0);
34
+ function onData(buffer) {
35
+ const [messages, remaining] = extractMessages(Buffer.concat([lastRemaining, buffer]));
36
+ for (const message of messages) {
37
+ const response = JSON.parse(Buffer.from(message).toString());
38
+ onResponse(response);
39
+ }
40
+ lastRemaining = remaining;
41
+ }
42
+ socket.on('close', onClose);
43
+ socket.on('data', onData);
44
+ // Wait for the socket to open.
45
+ await new Promise((resolve, reject) => {
46
+ socket.on('ready', () => {
47
+ resolve();
48
+ socket.off('error', reject);
49
+ });
50
+ socket.on('error', reject);
51
+ });
52
+ return Object.assign(socket, {
53
+ close() {
54
+ socket.destroy();
55
+ socket.end();
56
+ },
57
+ request({ body }) {
58
+ if (socket.readyState !== 'open')
59
+ throw new WebSocketRequestError({
60
+ body,
61
+ url: path,
62
+ details: 'Socket is closed.',
63
+ });
64
+ return socket.write(JSON.stringify(body));
65
+ },
66
+ });
67
+ },
68
+ url: path,
69
+ });
70
+ }
71
+ //# sourceMappingURL=ipc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipc.js","sourceRoot":"","sources":["../../../utils/rpc/ipc.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,OAAO,EAAE,MAAM,UAAU,CAAA;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAGL,kBAAkB,GACnB,MAAM,aAAa,CAAA;AAE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,MAAM,CAAC,UAAU,KAAK,MAAM;wBAC9B,MAAM,IAAI,qBAAqB,CAAC;4BAC9B,IAAI;4BACJ,GAAG,EAAE,IAAI;4BACT,OAAO,EAAE,mBAAmB;yBAC7B,CAAC,CAAA;oBAEJ,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;gBAC3C,CAAC;aACY,CAAC,CAAA;QAClB,CAAC;QACD,GAAG,EAAE,IAAI;KACV,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { TimeoutError } from '../../errors/request.js';
2
+ import { createBatchScheduler, } from '../promise/createBatchScheduler.js';
3
+ import { withTimeout } from '../promise/withTimeout.js';
4
+ import { idCache } from './id.js';
5
+ export const socketClientCache = /*#__PURE__*/ new Map();
6
+ export async function getSocketRpcClient(params) {
7
+ const { getSocket, url } = params;
8
+ let socketClient = socketClientCache.get(url);
9
+ // If the socket already exists, return it.
10
+ if (socketClient)
11
+ return socketClient;
12
+ const { schedule } = createBatchScheduler({
13
+ id: url,
14
+ fn: async () => {
15
+ // Set up a cache for incoming "synchronous" requests.
16
+ const requests = new Map();
17
+ // Set up a cache for subscriptions (eth_subscribe).
18
+ const subscriptions = new Map();
19
+ // Set up socket implementation.
20
+ const socket = await getSocket({
21
+ onResponse(data) {
22
+ const isSubscription = data.method === 'eth_subscription';
23
+ const id = isSubscription ? data.params.subscription : data.id;
24
+ const cache = isSubscription ? subscriptions : requests;
25
+ const callback = cache.get(id);
26
+ if (callback)
27
+ callback(data);
28
+ if (!isSubscription)
29
+ cache.delete(id);
30
+ },
31
+ });
32
+ // Create a new socket instance.
33
+ socketClient = {
34
+ close() {
35
+ socket.close();
36
+ socketClientCache.delete(url);
37
+ },
38
+ socket,
39
+ request({ body, onError, onResponse }) {
40
+ const id = body.id ?? idCache.take();
41
+ const callback = (response) => {
42
+ if (typeof response.id === 'number' && id !== response.id)
43
+ return;
44
+ // If we are subscribing to a topic, we want to set up a listener for incoming
45
+ // messages.
46
+ if (body.method === 'eth_subscribe' &&
47
+ typeof response.result === 'string')
48
+ subscriptions.set(response.result, callback);
49
+ // If we are unsubscribing from a topic, we want to remove the listener.
50
+ if (body.method === 'eth_unsubscribe')
51
+ subscriptions.delete(body.params?.[0]);
52
+ onResponse(response);
53
+ // TODO: delete request?
54
+ };
55
+ requests.set(id, callback);
56
+ try {
57
+ socket.request({
58
+ body: {
59
+ jsonrpc: '2.0',
60
+ id,
61
+ ...body,
62
+ },
63
+ });
64
+ }
65
+ catch (error) {
66
+ onError?.(error);
67
+ }
68
+ },
69
+ requestAsync({ body, timeout = 10000 }) {
70
+ return withTimeout(() => new Promise((onResponse, onError) => this.request({
71
+ body,
72
+ onError,
73
+ onResponse,
74
+ })), {
75
+ errorInstance: new TimeoutError({ body, url }),
76
+ timeout,
77
+ });
78
+ },
79
+ requests,
80
+ subscriptions,
81
+ url,
82
+ };
83
+ socketClientCache.set(url, socketClient);
84
+ return [socketClient];
85
+ },
86
+ });
87
+ const [_, [socketClient_]] = await schedule();
88
+ return socketClient_;
89
+ }
90
+ //# sourceMappingURL=socket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../utils/rpc/socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAGtD,OAAO,EAEL,oBAAoB,GACrB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AA2CjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,GAAG,EAGnD,CAAA;AAEH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAA4C;IAE5C,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;IAEjC,IAAI,YAAY,GAAG,iBAAiB,CA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F,CAAA;gBACH,CAAC;gBACD,QAAQ;gBACR,aAAa;gBACb,GAAG;aACJ,CAAA;YACD,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAA;YAExC,OAAO,CAAC,YAA6C,CAAC,CAAA;QACxD,CAAC;KACF,CAAC,CAAA;IAEF,MAAM,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,GAAG,MAAM,QAAQ,EAAE,CAAA;IAC7C,OAAO,aAAa,CAAA;AACtB,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { WebSocketRequestError } from '../../errors/request.js';
2
+ import { getSocketRpcClient, } from './socket.js';
3
+ export async function getWebSocketRpcClient(url) {
4
+ return getSocketRpcClient({
5
+ async getSocket({ onResponse }) {
6
+ const WebSocket = await import('isows').then((module) => module.WebSocket);
7
+ const socket = new WebSocket(url);
8
+ function onClose() {
9
+ socket.removeEventListener('close', onClose);
10
+ socket.removeEventListener('message', onMessage);
11
+ }
12
+ function onMessage({ data }) {
13
+ onResponse(JSON.parse(data));
14
+ }
15
+ // Setup event listeners for RPC & subscription responses.
16
+ socket.addEventListener('close', onClose);
17
+ socket.addEventListener('message', onMessage);
18
+ // Wait for the socket to open.
19
+ if (socket.readyState === WebSocket.CONNECTING) {
20
+ await new Promise((resolve, reject) => {
21
+ if (!socket)
22
+ return;
23
+ socket.onopen = resolve;
24
+ socket.onerror = reject;
25
+ });
26
+ }
27
+ const { close: close_ } = socket;
28
+ return Object.assign(socket, {
29
+ close() {
30
+ close_.bind(socket)();
31
+ onClose();
32
+ },
33
+ request({ body }) {
34
+ if (socket.readyState === socket.CLOSED ||
35
+ socket.readyState === socket.CLOSING)
36
+ throw new WebSocketRequestError({
37
+ body,
38
+ url: socket.url,
39
+ details: 'Socket is closed.',
40
+ });
41
+ return socket.send(JSON.stringify(body));
42
+ },
43
+ });
44
+ },
45
+ url,
46
+ });
47
+ }
48
+ //# sourceMappingURL=webSocket.js.map
@@ -0,0 +1 @@
1
+ {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YAED,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;YAEhC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;gBAC3B,KAAK;oBACH,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;oBACrB,OAAO,EAAE,CAAA;gBACX,CAAC;gBACD,OAAO,CAAC,EAAE,IAAI,EAAE;oBACd,IACE,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC,MAAM;wBACnC,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC,OAAO;wBAEpC,MAAM,IAAI,qBAAqB,CAAC;4BAC9B,IAAI;4BACJ,GAAG,EAAE,MAAM,CAAC,GAAG;4BACf,OAAO,EAAE,mBAAmB;yBAC7B,CAAC,CAAA;oBAEJ,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;gBAC1C,CAAC;aACmB,CAAC,CAAA;QACzB,CAAC;QACD,GAAG;KACJ,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ export declare const blastSepolia: {
2
+ blockExplorers: {
3
+ readonly default: {
4
+ readonly name: "Blastscan";
5
+ readonly url: "https://testnet.blastscan.io";
6
+ };
7
+ };
8
+ contracts?: {
9
+ [x: string]: import("../../index.js").ChainContract | {
10
+ [sourceId: number]: import("../../index.js").ChainContract | undefined;
11
+ } | undefined;
12
+ ensRegistry?: import("../../index.js").ChainContract | undefined;
13
+ ensUniversalResolver?: import("../../index.js").ChainContract | undefined;
14
+ multicall3?: import("../../index.js").ChainContract | undefined;
15
+ } | undefined;
16
+ id: 168587773;
17
+ name: "Blast Sepolia";
18
+ nativeCurrency: {
19
+ readonly name: "Ether";
20
+ readonly symbol: "ETH";
21
+ readonly decimals: 18;
22
+ };
23
+ rpcUrls: {
24
+ readonly default: {
25
+ readonly http: readonly ["https://sepolia.blast.io"];
26
+ };
27
+ };
28
+ sourceId?: number | undefined;
29
+ testnet: true;
30
+ formatters?: undefined;
31
+ serializers?: import("../../index.js").ChainSerializers<undefined> | undefined;
32
+ fees?: import("../../index.js").ChainFees<undefined> | undefined;
33
+ };
34
+ //# sourceMappingURL=blastSepolia.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blastSepolia.d.ts","sourceRoot":"","sources":["../../../chains/definitions/blastSepolia.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBvB,CAAA"}
@@ -18,6 +18,7 @@ export { bearNetworkChainMainnet } from './definitions/bearNetworkChainMainnet.j
18
18
  export { bearNetworkChainTestnet } from './definitions/bearNetworkChainTestnet.js';
19
19
  export { bitTorrent } from './definitions/bitTorrent.js';
20
20
  export { bitTorrentTestnet } from './definitions/bitTorrentTestnet.js';
21
+ export { blastSepolia } from './definitions/blastSepolia.js';
21
22
  export { boba } from './definitions/boba.js';
22
23
  export { bronos } from './definitions/bronos.js';
23
24
  export { bronosTestnet } from './definitions/bronosTestnet.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../chains/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,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AAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAK1D,YAAY,EACV,MAAM,EACN,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,cAAc,GACf,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,qCAAqC,EACrC,kBAAkB,EAClB,yBAAyB,EACzB,kCAAkC,EAClC,8BAA8B,EAC9B,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,gCAAgC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { type UrlRequiredErrorType } from '../../errors/transport.js';
2
2
  import type { ErrorType } from '../../errors/utils.js';
3
- import { type HttpOptions } from '../../utils/rpc.js';
3
+ import { type HttpRpcClientOptions } from '../../utils/rpc/http.js';
4
4
  import { type CreateTransportErrorType, type Transport, type TransportConfig } from './createTransport.js';
5
5
  export type BatchOptions = {
6
6
  /** The maximum number of JSON-RPC requests to send in a batch. @default 1_000 */
@@ -18,7 +18,7 @@ export type HttpTransportConfig = {
18
18
  * Request configuration to pass to `fetch`.
19
19
  * @link https://developer.mozilla.org/en-US/docs/Web/API/fetch
20
20
  */
21
- fetchOptions?: HttpOptions['fetchOptions'];
21
+ fetchOptions?: HttpRpcClientOptions['fetchOptions'];
22
22
  /** The key of the HTTP transport. */
23
23
  key?: TransportConfig['key'];
24
24
  /** The name of the HTTP transport. */
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../clients/transports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CAAA;CACb,CACF,CAAA;AAED,MAAM,MAAM,sBAAsB,GAC9B,wBAAwB,GACxB,oBAAoB,GACpB,SAAS,CAAA;AAEb;;GAEG;AACH,wBAAgB,IAAI;AAClB,uEAAuE;AACvE,GAAG,CAAC,EAAE,MAAM,EACZ,MAAM,GAAE,mBAAwB,GAC/B,aAAa,CAmEf"}
@@ -0,0 +1,46 @@
1
+ import { type UrlRequiredErrorType } from '../../errors/transport.js';
2
+ import type { ErrorType } from '../../errors/utils.js';
3
+ import type { Hash } from '../../types/misc.js';
4
+ import type { RpcResponse } from '../../types/rpc.js';
5
+ import { type IpcRpcClient } from '../../utils/rpc/ipc.js';
6
+ import { type CreateTransportErrorType, type Transport, type TransportConfig } from './createTransport.js';
7
+ type IpcTransportSubscribeParameters = {
8
+ onData: (data: RpcResponse) => void;
9
+ onError?: (error: any) => void;
10
+ };
11
+ type IpcTransportSubscribeReturnType = {
12
+ subscriptionId: Hash;
13
+ unsubscribe: () => Promise<RpcResponse<boolean>>;
14
+ };
15
+ type IpcTransportSubscribe = {
16
+ subscribe(args: IpcTransportSubscribeParameters & {
17
+ /**
18
+ * @description Add information about compiled contracts
19
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_addcompilationresult
20
+ */
21
+ params: ['newHeads'];
22
+ }): Promise<IpcTransportSubscribeReturnType>;
23
+ };
24
+ export type IpcTransportConfig = {
25
+ /** The key of the Ipc transport. */
26
+ key?: TransportConfig['key'];
27
+ /** The name of the Ipc transport. */
28
+ name?: TransportConfig['name'];
29
+ /** The max number of times to retry. */
30
+ retryCount?: TransportConfig['retryCount'];
31
+ /** The base delay (in ms) between retries. */
32
+ retryDelay?: TransportConfig['retryDelay'];
33
+ /** The timeout (in ms) for async Ipc requests. Default: 10_000 */
34
+ timeout?: TransportConfig['timeout'];
35
+ };
36
+ export type IpcTransport = Transport<'ipc', {
37
+ getRpcClient(): Promise<IpcRpcClient>;
38
+ subscribe: IpcTransportSubscribe['subscribe'];
39
+ }>;
40
+ export type IpcTransportErrorType = CreateTransportErrorType | UrlRequiredErrorType | ErrorType;
41
+ /**
42
+ * @description Creates an IPC transport that connects to a JSON-RPC API.
43
+ */
44
+ export declare function ipc(path: string, config?: IpcTransportConfig): IpcTransport;
45
+ export {};
46
+ //# sourceMappingURL=ipc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipc.d.ts","sourceRoot":"","sources":["../../../clients/transports/ipc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,wBAAwB,CAAA;AAC3E,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EACd,KAAK,eAAe,EAErB,MAAM,sBAAsB,CAAA;AAE7B,KAAK,+BAA+B,GAAG;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CAC/B,CAAA;AAED,KAAK,+BAA+B,GAAG;IACrC,cAAc,EAAE,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;CACjD,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CACP,IAAI,EAAE,+BAA+B,GAAG;QACtC;;;WAGG;QACH,MAAM,EAAE,CAAC,UAAU,CAAC,CAAA;KACrB,GACA,OAAO,CAAC,+BAA+B,CAAC,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,oCAAoC;IACpC,GAAG,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;IAC5B,qCAAqC;IACrC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,wCAAwC;IACxC,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;IAC1C,8CAA8C;IAC9C,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;IAC1C,kEAAkE;IAClE,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAClC,KAAK,EACL;IACE,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,CAAA;IACrC,SAAS,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAA;CAC9C,CACF,CAAA;AAED,MAAM,MAAM,qBAAqB,GAC7B,wBAAwB,GACxB,oBAAoB,GACpB,SAAS,CAAA;AAEb;;GAEG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,kBAAuB,GAC9B,YAAY,CA4Ed"}
@@ -1,7 +1,8 @@
1
1
  import { type UrlRequiredErrorType } from '../../errors/transport.js';
2
2
  import type { ErrorType } from '../../errors/utils.js';
3
3
  import type { Hash } from '../../types/misc.js';
4
- import { type RpcResponse } from '../../utils/rpc.js';
4
+ import type { RpcResponse } from '../../types/rpc.js';
5
+ import type { SocketRpcClient } from '../../utils/rpc/socket.js';
5
6
  import { type CreateTransportErrorType, type Transport, type TransportConfig } from './createTransport.js';
6
7
  type WebSocketTransportSubscribeParameters = {
7
8
  onData: (data: RpcResponse) => void;
@@ -33,7 +34,11 @@ export type WebSocketTransportConfig = {
33
34
  timeout?: TransportConfig['timeout'];
34
35
  };
35
36
  export type WebSocketTransport = Transport<'webSocket', {
37
+ /**
38
+ * @deprecated use `getRpcClient` instead.
39
+ */
36
40
  getSocket(): Promise<WebSocket>;
41
+ getRpcClient(): Promise<SocketRpcClient<WebSocket>>;
37
42
  subscribe: WebSocketTransportSubscribe['subscribe'];
38
43
  }>;
39
44
  export type WebSocketTransportErrorType = CreateTransportErrorType | UrlRequiredErrorType | ErrorType;
@@ -1 +1 @@
1
- {"version":3,"file":"webSocket.d.ts","sourceRoot":"","sources":["../../../clients/transports/webSocket.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,oBAAoB,CAAA;AACrE,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EACd,KAAK,eAAe,EAErB,MAAM,sBAAsB,CAAA;AAE7B,KAAK,qCAAqC,GAAG;IAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CAC/B,CAAA;AAED,KAAK,qCAAqC,GAAG;IAC3C,cAAc,EAAE,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;CACjD,CAAA;AAED,KAAK,2BAA2B,GAAG;IACjC,SAAS,CACP,IAAI,EAAE,qCAAqC,GAAG;QAC5C;;;WAGG;QACH,MAAM,EAAE,CAAC,UAAU,CAAC,CAAA;KACrB,GACA,OAAO,CAAC,qCAAqC,CAAC,CAAA;CAClD,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,0CAA0C;IAC1C,GAAG,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;IAC5B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,wCAAwC;IACxC,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,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,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;CACjD,CAAA;AAED,KAAK,2BAA2B,GAAG;IACjC,SAAS,CACP,IAAI,EAAE,qCAAqC,GAAG;QAC5C;;;WAGG;QACH,MAAM,EAAE,CAAC,UAAU,CAAC,CAAA;KACrB,GACA,OAAO,CAAC,qCAAqC,CAAC,CAAA;CAClD,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,0CAA0C;IAC1C,GAAG,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;IAC5B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,wCAAwC;IACxC,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;IAC1C,8CAA8C;IAC9C,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;IAC1C,wEAAwE;IACxE,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,SAAS,CACxC,WAAW,EACX;IACE;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAA;IAC/B,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAA;IACnD,SAAS,EAAE,2BAA2B,CAAC,WAAW,CAAC,CAAA;CACpD,CACF,CAAA;AAED,MAAM,MAAM,2BAA2B,GACnC,wBAAwB,GACxB,oBAAoB,GACpB,SAAS,CAAA;AAEb;;GAEG;AACH,wBAAgB,SAAS;AACvB,uEAAuE;AACvE,GAAG,CAAC,EAAE,MAAM,EACZ,MAAM,GAAE,wBAA6B,GACpC,kBAAkB,CAiFpB"}
@@ -1,2 +1,2 @@
1
- export declare const version = "2.4.0";
1
+ export declare const version = "2.5.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { type IpcTransport, type IpcTransportConfig, type IpcTransportErrorType, ipc, } from '../clients/transports/ipc.js';
2
+ export { type IpcRpcClient, getIpcRpcClient, } from '../utils/rpc/ipc.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,GAAG,GACJ,MAAM,8BAA8B,CAAA;AAErC,OAAO,EACL,KAAK,YAAY,EACjB,eAAe,GAChB,MAAM,qBAAqB,CAAA"}