viem 0.0.1-alpha.8 → 0.0.1-alpha.9

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.
@@ -1,7 +1,7 @@
1
- export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse, be as FormattedTransactionRequest, G as GetBalanceArgs, e as GetBalanceResponse, f as GetBlockArgs, g as GetBlockNumberArgs, h as GetBlockNumberResponse, i as GetBlockResponse, j as GetBlockTransactionCountArgs, k as GetBlockTransactionCountResponse, l as GetFeeHistoryArgs, m as GetFeeHistoryResponse, n as GetFilterChangesArgs, o as GetFilterChangesResponse, p as GetFilterLogsArgs, q as GetFilterLogsResponse, r as GetGasPriceResponse, s as GetPermissionsResponse, t as GetTransactionArgs, u as GetTransactionConfirmationsArgs, v as GetTransactionConfirmationsResponse, w as GetTransactionCountArgs, x as GetTransactionCountResponse, z as GetTransactionReceiptArgs, A as GetTransactionReceiptResponse, y as GetTransactionResponse, I as ImpersonateAccountArgs, B as IncreaseTimeArgs, M as MineArgs, O as OnBlock, F as OnBlockNumber, H as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, bc as ReplacementReason, bd as ReplacementResponse, N as RequestPermissionsResponse, R as ResetArgs, P as RevertArgs, S as SendTransactionArgs, Q as SendTransactionResponse, T as SendUnsignedTransactionArgs, U as SendUnsignedTransactionResponse, V as SetBalanceArgs, W as SetBlockGasLimitArgs, $ as SetBlockTimestampIntervalArgs, X as SetCodeArgs, Y as SetCoinbaseArgs, Z as SetIntervalMiningArgs, _ as SetMinGasPriceArgs, a1 as SetNextBlockBaseFeePerGasArgs, a0 as SetNextBlockTimestampArgs, a2 as SetNonceArgs, a3 as SetStorageAtArgs, a4 as SignMessageArgs, a5 as SignMessageResponse, a6 as StopImpersonatingAccountArgs, a7 as SwitchChainArgs, a8 as UninstallFilterArgs, a9 as UninstallFilterResponse, aa as WaitForTransactionReceiptArgs, ab as WaitForTransactionReceiptResponse, ac as WatchAssetArgs, ad as WatchAssetResponse, ae as WatchBlockNumberArgs, af as WatchBlocksArgs, ag as WatchPendingTransactionsArgs, ah as addChain, ai as call, aj as createBlockFilter, ak as createPendingTransactionFilter, am as dropTransaction, al as estimateGas, an as getAccounts, ao as getAutomine, ap as getBalance, aq as getBlock, ar as getBlockNumber, bb as getBlockNumberCache, as as getBlockTransactionCount, at as getChainId, au as getFeeHistory, av as getFilterChanges, aw as getFilterLogs, ax as getGasPrice, ay as getPermissions, az as getTransaction, aA as getTransactionConfirmations, aB as getTransactionCount, aC as getTransactionReceipt, aD as getTxpoolContent, aE as getTxpoolStatus, aF as impersonateAccount, aG as increaseTime, aH as inspectTxpool, aI as mine, aJ as removeBlockTimestampInterval, aL as requestAccounts, aM as requestPermissions, aK as reset, aN as revert, aO as sendTransaction, aP as sendUnsignedTransaction, aQ as setAutomine, aR as setBalance, aS as setBlockGasLimit, aT as setBlockTimestampInterval, aU as setCode, aV as setCoinbase, aW as setIntervalMining, aX as setLoggingEnabled, aY as setMinGasPrice, aZ as setNextBlockBaseFeePerGas, a_ as setNextBlockTimestamp, a$ as setNonce, b0 as setStorageAt, b1 as signMessage, b2 as snapshot, b3 as stopImpersonatingAccount, b4 as switchChain, b5 as uninstallFilter, b6 as waitForTransactionReceipt, b7 as watchAsset, b8 as watchBlockNumber, b9 as watchBlocks, ba as watchPendingTransactions } from '../watchAsset-e99e744d.js';
1
+ export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse, be as FormattedTransactionRequest, G as GetBalanceArgs, e as GetBalanceResponse, f as GetBlockArgs, g as GetBlockNumberArgs, h as GetBlockNumberResponse, i as GetBlockResponse, j as GetBlockTransactionCountArgs, k as GetBlockTransactionCountResponse, l as GetFeeHistoryArgs, m as GetFeeHistoryResponse, n as GetFilterChangesArgs, o as GetFilterChangesResponse, p as GetFilterLogsArgs, q as GetFilterLogsResponse, r as GetGasPriceResponse, s as GetPermissionsResponse, t as GetTransactionArgs, u as GetTransactionConfirmationsArgs, v as GetTransactionConfirmationsResponse, w as GetTransactionCountArgs, x as GetTransactionCountResponse, z as GetTransactionReceiptArgs, A as GetTransactionReceiptResponse, y as GetTransactionResponse, I as ImpersonateAccountArgs, B as IncreaseTimeArgs, M as MineArgs, O as OnBlock, F as OnBlockNumber, H as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, bc as ReplacementReason, bd as ReplacementResponse, N as RequestPermissionsResponse, R as ResetArgs, P as RevertArgs, S as SendTransactionArgs, Q as SendTransactionResponse, T as SendUnsignedTransactionArgs, U as SendUnsignedTransactionResponse, V as SetBalanceArgs, W as SetBlockGasLimitArgs, $ as SetBlockTimestampIntervalArgs, X as SetCodeArgs, Y as SetCoinbaseArgs, Z as SetIntervalMiningArgs, _ as SetMinGasPriceArgs, a1 as SetNextBlockBaseFeePerGasArgs, a0 as SetNextBlockTimestampArgs, a2 as SetNonceArgs, a3 as SetStorageAtArgs, a4 as SignMessageArgs, a5 as SignMessageResponse, a6 as StopImpersonatingAccountArgs, a7 as SwitchChainArgs, a8 as UninstallFilterArgs, a9 as UninstallFilterResponse, aa as WaitForTransactionReceiptArgs, ab as WaitForTransactionReceiptResponse, ac as WatchAssetArgs, ad as WatchAssetResponse, ae as WatchBlockNumberArgs, af as WatchBlocksArgs, ag as WatchPendingTransactionsArgs, ah as addChain, ai as call, aj as createBlockFilter, ak as createPendingTransactionFilter, am as dropTransaction, al as estimateGas, an as getAccounts, ao as getAutomine, ap as getBalance, aq as getBlock, ar as getBlockNumber, bb as getBlockNumberCache, as as getBlockTransactionCount, at as getChainId, au as getFeeHistory, av as getFilterChanges, aw as getFilterLogs, ax as getGasPrice, ay as getPermissions, az as getTransaction, aA as getTransactionConfirmations, aB as getTransactionCount, aC as getTransactionReceipt, aD as getTxpoolContent, aE as getTxpoolStatus, aF as impersonateAccount, aG as increaseTime, aH as inspectTxpool, aI as mine, aJ as removeBlockTimestampInterval, aL as requestAccounts, aM as requestPermissions, aK as reset, aN as revert, aO as sendTransaction, aP as sendUnsignedTransaction, aQ as setAutomine, aR as setBalance, aS as setBlockGasLimit, aT as setBlockTimestampInterval, aU as setCode, aV as setCoinbase, aW as setIntervalMining, aX as setLoggingEnabled, aY as setMinGasPrice, aZ as setNextBlockBaseFeePerGas, a_ as setNextBlockTimestamp, a$ as setNonce, b0 as setStorageAt, b1 as signMessage, b2 as snapshot, b3 as stopImpersonatingAccount, b4 as switchChain, b5 as uninstallFilter, b6 as waitForTransactionReceipt, b7 as watchAsset, b8 as watchBlockNumber, b9 as watchBlocks, ba as watchPendingTransactions } from '../watchAsset-dc7dcdd9.js';
2
2
  import '../chains.js';
3
3
  import '../rpc-b77c5aee.js';
4
4
  import '@wagmi/chains';
5
- import '../createWalletClient-b5c3c89e.js';
6
- import '../eip1193-100454ab.js';
5
+ import '../createWalletClient-d612fe08.js';
6
+ import '../eip1193-020a6f13.js';
7
7
  import '../transactionRequest-3e463099.js';
@@ -58,9 +58,9 @@ import {
58
58
  watchBlockNumber,
59
59
  watchBlocks,
60
60
  watchPendingTransactions
61
- } from "../chunk-N6PIT2C5.js";
62
- import "../chunk-4Z43OTO6.js";
63
- import "../chunk-ALVD6MNU.js";
61
+ } from "../chunk-6BXRN6CQ.js";
62
+ import "../chunk-26WUARDL.js";
63
+ import "../chunk-7H5SPKXN.js";
64
64
  export {
65
65
  addChain,
66
66
  call,
package/dist/chains.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  formatTransaction,
4
4
  formatTransactionReceipt,
5
5
  formatTransactionRequest
6
- } from "./chunk-4Z43OTO6.js";
7
- import "./chunk-ALVD6MNU.js";
6
+ } from "./chunk-26WUARDL.js";
7
+ import "./chunk-7H5SPKXN.js";
8
8
 
9
9
  // src/chains.ts
10
10
  import {
@@ -24,7 +24,7 @@ import {
24
24
  InvalidHexValueError,
25
25
  OffsetOutOfBoundsError,
26
26
  SizeExceedsPaddingSizeError
27
- } from "./chunk-ALVD6MNU.js";
27
+ } from "./chunk-7H5SPKXN.js";
28
28
 
29
29
  // src/utils/data/concat.ts
30
30
  function concat(values) {
@@ -603,7 +603,9 @@ function prepareParam({
603
603
  if (param.type === "string") {
604
604
  return encodeString(value);
605
605
  }
606
- throw new InvalidAbiEncodingTypeError(param.type);
606
+ throw new InvalidAbiEncodingTypeError(param.type, {
607
+ docsPath: "/docs/contract/encodeAbi"
608
+ });
607
609
  }
608
610
  function encodeParams(preparedParams) {
609
611
  let staticSize = 0;
@@ -733,10 +735,13 @@ function decodeAbi({
733
735
  }) {
734
736
  if (size(data) % 32 !== 0)
735
737
  throw new AbiDecodingDataSizeInvalidError(size(data));
736
- return decodeParams({
738
+ const values = decodeParams({
737
739
  data,
738
740
  params
739
741
  });
742
+ if (values.length === 0)
743
+ return void 0;
744
+ return values;
740
745
  }
741
746
  function decodeParams({
742
747
  data,
@@ -785,7 +790,9 @@ function decodeParam({
785
790
  if (param.type === "bool") {
786
791
  return decodeBool(value);
787
792
  }
788
- throw new InvalidAbiDecodingTypeError(param.type);
793
+ throw new InvalidAbiDecodingTypeError(param.type, {
794
+ docsPath: "/docs/contract/decodeAbi"
795
+ });
789
796
  }
790
797
  function decodeAddress(value) {
791
798
  return { consumed: 32, value: checksumAddress(trim(value)) };
@@ -920,7 +927,9 @@ function hasDynamicChild(param) {
920
927
  // src/utils/abi/getDefinition.ts
921
928
  function getDefinition(description) {
922
929
  if (description.type !== "function" && description.type !== "event" && description.type !== "error")
923
- throw new InvalidDefinitionTypeError(description.type);
930
+ throw new InvalidDefinitionTypeError(description.type, {
931
+ docsPath: "/docs/contract/getDefinition"
932
+ });
924
933
  return `${description.name}(${getParams(description.inputs)})`;
925
934
  }
926
935
  function getParams(params) {
@@ -944,7 +953,9 @@ function decodeErrorResult({ abi, data }) {
944
953
  (x) => signature === getFunctionSignature(getDefinition(x))
945
954
  );
946
955
  if (!description)
947
- throw new AbiErrorSignatureNotFoundError(signature);
956
+ throw new AbiErrorSignatureNotFoundError(signature, {
957
+ docsPath: "/docs/contract/decodeErrorResult"
958
+ });
948
959
  return {
949
960
  errorName: description.name,
950
961
  args: "inputs" in description && description.inputs && description.inputs.length > 0 ? decodeAbi({ data: slice(data, 4), params: description.inputs }) : void 0
@@ -958,7 +969,9 @@ function decodeFunctionData({ abi, data }) {
958
969
  (x) => signature === getFunctionSignature(getDefinition(x))
959
970
  );
960
971
  if (!description)
961
- throw new AbiFunctionSignatureNotFoundError(signature);
972
+ throw new AbiFunctionSignatureNotFoundError(signature, {
973
+ docsPath: "/docs/contract/decodeFunctionData"
974
+ });
962
975
  return {
963
976
  functionName: description.name,
964
977
  args: "inputs" in description && description.inputs && description.inputs.length > 0 ? decodeAbi({ data: slice(data, 4), params: description.inputs }) : void 0
@@ -966,6 +979,7 @@ function decodeFunctionData({ abi, data }) {
966
979
  }
967
980
 
968
981
  // src/utils/abi/decodeFunctionResult.ts
982
+ var docsPath = "/docs/contract/decodeFunctionResult";
969
983
  function decodeFunctionResult({
970
984
  abi,
971
985
  functionName,
@@ -973,14 +987,19 @@ function decodeFunctionResult({
973
987
  }) {
974
988
  const description = abi.find((x) => "name" in x && x.name === functionName);
975
989
  if (!description)
976
- throw new AbiFunctionNotFoundError(functionName);
990
+ throw new AbiFunctionNotFoundError(functionName, { docsPath });
977
991
  if (!("outputs" in description))
978
- throw new AbiFunctionOutputsNotFoundError(functionName);
992
+ throw new AbiFunctionOutputsNotFoundError(functionName, { docsPath });
979
993
  const values = decodeAbi({ data, params: description.outputs });
980
- return values.length > 1 ? values : values.length === 1 ? values[0] : void 0;
994
+ if (values && values.length > 1)
995
+ return values;
996
+ if (values && values.length === 1)
997
+ return values[0];
998
+ return void 0;
981
999
  }
982
1000
 
983
1001
  // src/utils/abi/encodeDeployData.ts
1002
+ var docsPath2 = "/docs/contract/encodeDeployData";
984
1003
  function encodeDeployData({
985
1004
  abi,
986
1005
  args,
@@ -990,11 +1009,11 @@ function encodeDeployData({
990
1009
  return bytecode;
991
1010
  const description = abi.find((x) => "type" in x && x.type === "constructor");
992
1011
  if (!description)
993
- throw new AbiConstructorNotFoundError();
1012
+ throw new AbiConstructorNotFoundError({ docsPath: docsPath2 });
994
1013
  if (!("inputs" in description))
995
- throw new AbiConstructorParamsNotFoundError();
1014
+ throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath2 });
996
1015
  if (!description.inputs || description.inputs.length === 0)
997
- throw new AbiConstructorParamsNotFoundError();
1016
+ throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath2 });
998
1017
  const data = encodeAbi({
999
1018
  params: description.inputs,
1000
1019
  values: args
@@ -1003,6 +1022,7 @@ function encodeDeployData({
1003
1022
  }
1004
1023
 
1005
1024
  // src/utils/abi/encodeErrorResult.ts
1025
+ var docsPath3 = "/docs/contract/encodeErrorResult";
1006
1026
  function encodeErrorResult({
1007
1027
  abi,
1008
1028
  errorName,
@@ -1010,13 +1030,13 @@ function encodeErrorResult({
1010
1030
  }) {
1011
1031
  const description = abi.find((x) => "name" in x && x.name === errorName);
1012
1032
  if (!description)
1013
- throw new AbiErrorNotFoundError(errorName);
1033
+ throw new AbiErrorNotFoundError(errorName, { docsPath: docsPath3 });
1014
1034
  const definition = getDefinition(description);
1015
1035
  const signature = getFunctionSignature(definition);
1016
1036
  let data = "0x";
1017
1037
  if (args && args.length > 0) {
1018
1038
  if (!("inputs" in description && description.inputs))
1019
- throw new AbiErrorInputsNotFoundError(errorName);
1039
+ throw new AbiErrorInputsNotFoundError(errorName, { docsPath: docsPath3 });
1020
1040
  data = encodeAbi({ params: description.inputs, values: args });
1021
1041
  }
1022
1042
  return concatHex([signature, data]);
@@ -1030,7 +1050,9 @@ function encodeEventTopics({
1030
1050
  }) {
1031
1051
  const description = abi.find((x) => "name" in x && x.name === eventName);
1032
1052
  if (!description)
1033
- throw new AbiEventNotFoundError(eventName);
1053
+ throw new AbiEventNotFoundError(eventName, {
1054
+ docsPath: "/docs/contract/encodeEventTopics"
1055
+ });
1034
1056
  const definition = getDefinition(description);
1035
1057
  const signature = getEventSignature(definition);
1036
1058
  let topics = [];
@@ -1063,7 +1085,9 @@ function encodeFunctionData({
1063
1085
  }) {
1064
1086
  const description = abi.find((x) => "name" in x && x.name === functionName);
1065
1087
  if (!description)
1066
- throw new AbiFunctionNotFoundError(functionName);
1088
+ throw new AbiFunctionNotFoundError(functionName, {
1089
+ docsPath: "/docs/contract/encodeFunctionData"
1090
+ });
1067
1091
  const definition = getDefinition(description);
1068
1092
  const signature = getFunctionSignature(definition);
1069
1093
  const data = "inputs" in description && description.inputs ? encodeAbi({
@@ -1074,6 +1098,7 @@ function encodeFunctionData({
1074
1098
  }
1075
1099
 
1076
1100
  // src/utils/abi/encodeFunctionResult.ts
1101
+ var docsPath4 = "/docs/contract/encodeFunctionResult";
1077
1102
  function encodeFunctionResult({
1078
1103
  abi,
1079
1104
  functionName,
@@ -1081,9 +1106,9 @@ function encodeFunctionResult({
1081
1106
  }) {
1082
1107
  const description = abi.find((x) => "name" in x && x.name === functionName);
1083
1108
  if (!description)
1084
- throw new AbiFunctionNotFoundError(functionName);
1109
+ throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });
1085
1110
  if (!("outputs" in description))
1086
- throw new AbiFunctionOutputsNotFoundError(functionName);
1111
+ throw new AbiFunctionOutputsNotFoundError(functionName, { docsPath: docsPath4 });
1087
1112
  let values = Array.isArray(result) ? result : [result];
1088
1113
  if (description.outputs.length === 0 && !values[0])
1089
1114
  values = [];
@@ -3,7 +3,7 @@ import {
3
3
  buildRequest,
4
4
  getSocket,
5
5
  rpc
6
- } from "./chunk-ALVD6MNU.js";
6
+ } from "./chunk-7H5SPKXN.js";
7
7
 
8
8
  // src/clients/transports/createTransport.ts
9
9
  function createTransport(config, value) {
@@ -11,7 +11,7 @@ import {
11
11
  getAddress,
12
12
  hexToNumber,
13
13
  numberToHex
14
- } from "./chunk-4Z43OTO6.js";
14
+ } from "./chunk-26WUARDL.js";
15
15
  import {
16
16
  BaseError,
17
17
  BlockNotFoundError,
@@ -22,7 +22,7 @@ import {
22
22
  getCache,
23
23
  wait,
24
24
  withCache
25
- } from "./chunk-ALVD6MNU.js";
25
+ } from "./chunk-7H5SPKXN.js";
26
26
 
27
27
  // src/actions/public/call.ts
28
28
  async function call(client, {
@@ -302,7 +302,7 @@ async function getTransactionCount(client, { address, blockTag = "latest", block
302
302
  method: "eth_getTransactionCount",
303
303
  params: [address, blockNumber ? numberToHex(blockNumber) : blockTag]
304
304
  });
305
- return hexToNumber(count ?? "0x0");
305
+ return hexToNumber(count);
306
306
  }
307
307
 
308
308
  // src/actions/public/getTransactionReceipt.ts
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
9
9
  var package_default = {
10
10
  name: "viem",
11
11
  description: "TypeScript (& JavaScript) Interface for Ethereum",
12
- version: "0.0.1-alpha.8",
12
+ version: "0.0.1-alpha.9",
13
13
  scripts: {
14
14
  anvil: "source .env && anvil --fork-url $ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME",
15
15
  bench: "vitest bench --no-threads",
@@ -158,28 +158,28 @@ var BaseError = class extends Error {
158
158
 
159
159
  // src/errors/abi.ts
160
160
  var AbiConstructorNotFoundError = class extends BaseError {
161
- constructor() {
161
+ constructor({ docsPath }) {
162
162
  super(
163
163
  [
164
- "Constructor arguments were provided (`args`), but a constructor was not found on the ABI.",
164
+ "A constructor was not found on the ABI.",
165
165
  "Make sure you are using the correct ABI and that the constructor exists on it."
166
166
  ].join("\n"),
167
167
  {
168
- docsPath: "/docs/contract/encodeDeployData"
168
+ docsPath
169
169
  }
170
170
  );
171
171
  __publicField(this, "name", "AbiConstructorNotFoundError");
172
172
  }
173
173
  };
174
174
  var AbiConstructorParamsNotFoundError = class extends BaseError {
175
- constructor() {
175
+ constructor({ docsPath }) {
176
176
  super(
177
177
  [
178
178
  "Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.",
179
179
  "Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."
180
180
  ].join("\n"),
181
181
  {
182
- docsPath: "/docs/contract/encodeDeployData"
182
+ docsPath
183
183
  }
184
184
  );
185
185
  __publicField(this, "name", "AbiConstructorParamsNotFoundError");
@@ -228,7 +228,7 @@ var AbiEncodingLengthMismatchError = class extends BaseError {
228
228
  }
229
229
  };
230
230
  var AbiErrorInputsNotFoundError = class extends BaseError {
231
- constructor(errorName) {
231
+ constructor(errorName, { docsPath }) {
232
232
  super(
233
233
  [
234
234
  `Arguments (\`args\`) were provided to "${errorName}", but "${errorName}" on the ABI does not contain any parameters (\`inputs\`).`,
@@ -236,28 +236,28 @@ var AbiErrorInputsNotFoundError = class extends BaseError {
236
236
  "Make sure you are using the correct ABI and that the inputs exist on it."
237
237
  ].join("\n"),
238
238
  {
239
- docsPath: "/docs/contract/encodeErrorResult"
239
+ docsPath
240
240
  }
241
241
  );
242
242
  __publicField(this, "name", "AbiErrorInputsNotFoundError");
243
243
  }
244
244
  };
245
245
  var AbiErrorNotFoundError = class extends BaseError {
246
- constructor(errorName) {
246
+ constructor(errorName, { docsPath }) {
247
247
  super(
248
248
  [
249
249
  `Error "${errorName}" not found on ABI.`,
250
250
  "Make sure you are using the correct ABI and that the error exists on it."
251
251
  ].join("\n"),
252
252
  {
253
- docsPath: "/docs/contract/encodeErrorResult"
253
+ docsPath
254
254
  }
255
255
  );
256
256
  __publicField(this, "name", "AbiErrorNotFoundError");
257
257
  }
258
258
  };
259
259
  var AbiErrorSignatureNotFoundError = class extends BaseError {
260
- constructor(signature) {
260
+ constructor(signature, { docsPath }) {
261
261
  super(
262
262
  [
263
263
  `Encoded error signature "${signature}" not found on ABI.`,
@@ -265,42 +265,42 @@ var AbiErrorSignatureNotFoundError = class extends BaseError {
265
265
  `You can look up the signature "${signature}" here: https://sig.eth.samczsun.com/.`
266
266
  ].join("\n"),
267
267
  {
268
- docsPath: "/docs/contract/decodeErrorResult"
268
+ docsPath
269
269
  }
270
270
  );
271
271
  __publicField(this, "name", "AbiErrorSignatureNotFoundError");
272
272
  }
273
273
  };
274
274
  var AbiEventNotFoundError = class extends BaseError {
275
- constructor(eventName) {
275
+ constructor(eventName, { docsPath }) {
276
276
  super(
277
277
  [
278
278
  `Event "${eventName}" not found on ABI.`,
279
279
  "Make sure you are using the correct ABI and that the event exists on it."
280
280
  ].join("\n"),
281
281
  {
282
- docsPath: "/docs/contract/encodeEventTopics"
282
+ docsPath
283
283
  }
284
284
  );
285
285
  __publicField(this, "name", "AbiEventNotFoundError");
286
286
  }
287
287
  };
288
288
  var AbiFunctionNotFoundError = class extends BaseError {
289
- constructor(functionName) {
289
+ constructor(functionName, { docsPath }) {
290
290
  super(
291
291
  [
292
292
  `Function "${functionName}" not found on ABI.`,
293
293
  "Make sure you are using the correct ABI and that the function exists on it."
294
294
  ].join("\n"),
295
295
  {
296
- docsPath: "/docs/contract/encodeFunctionData"
296
+ docsPath
297
297
  }
298
298
  );
299
299
  __publicField(this, "name", "AbiFunctionNotFoundError");
300
300
  }
301
301
  };
302
302
  var AbiFunctionOutputsNotFoundError = class extends BaseError {
303
- constructor(functionName) {
303
+ constructor(functionName, { docsPath }) {
304
304
  super(
305
305
  [
306
306
  `Function "${functionName}" does not contain any \`outputs\` on ABI.`,
@@ -308,14 +308,14 @@ var AbiFunctionOutputsNotFoundError = class extends BaseError {
308
308
  "Make sure you are using the correct ABI and that the function exists on it."
309
309
  ].join("\n"),
310
310
  {
311
- docsPath: "/docs/contract/decodeFunctionResult"
311
+ docsPath
312
312
  }
313
313
  );
314
314
  __publicField(this, "name", "AbiFunctionOutputsNotFoundError");
315
315
  }
316
316
  };
317
317
  var AbiFunctionSignatureNotFoundError = class extends BaseError {
318
- constructor(signature) {
318
+ constructor(signature, { docsPath }) {
319
319
  super(
320
320
  [
321
321
  `Encoded function signature "${signature}" not found on ABI.`,
@@ -323,32 +323,32 @@ var AbiFunctionSignatureNotFoundError = class extends BaseError {
323
323
  `You can look up the signature "${signature}" here: https://sig.eth.samczsun.com/.`
324
324
  ].join("\n"),
325
325
  {
326
- docsPath: "/docs/contract/decodeFunctionData"
326
+ docsPath
327
327
  }
328
328
  );
329
329
  __publicField(this, "name", "AbiFunctionSignatureNotFoundError");
330
330
  }
331
331
  };
332
332
  var InvalidAbiEncodingTypeError = class extends BaseError {
333
- constructor(type) {
333
+ constructor(type, { docsPath }) {
334
334
  super(
335
335
  [
336
336
  `Type "${type}" is not a valid encoding type.`,
337
337
  "Please provide a valid ABI type."
338
338
  ].join("\n"),
339
- { docsPath: "/docs/contract/encodeAbi#params" }
339
+ { docsPath }
340
340
  );
341
341
  __publicField(this, "name", "InvalidAbiEncodingType");
342
342
  }
343
343
  };
344
344
  var InvalidAbiDecodingTypeError = class extends BaseError {
345
- constructor(type) {
345
+ constructor(type, { docsPath }) {
346
346
  super(
347
347
  [
348
348
  `Type "${type}" is not a valid decoding type.`,
349
349
  "Please provide a valid ABI type."
350
350
  ].join("\n"),
351
- { docsPath: "/docs/contract/decodeAbi#params" }
351
+ { docsPath }
352
352
  );
353
353
  __publicField(this, "name", "InvalidAbiDecodingType");
354
354
  }
@@ -360,14 +360,14 @@ var InvalidArrayError = class extends BaseError {
360
360
  }
361
361
  };
362
362
  var InvalidDefinitionTypeError = class extends BaseError {
363
- constructor(type) {
363
+ constructor(type, { docsPath }) {
364
364
  super(
365
365
  [
366
366
  `"${type}" is not a valid definition type.`,
367
367
  'Valid types: "function", "event", "error"'
368
368
  ].join("\n"),
369
369
  {
370
- docsPath: "/docs/contract/getDefinition"
370
+ docsPath
371
371
  }
372
372
  );
373
373
  __publicField(this, "name", "InvalidDefinitionTypeError");
@@ -1,7 +1,7 @@
1
- export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from '../createWalletClient-b5c3c89e.js';
2
- export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from '../webSocket-f4abf66c.js';
1
+ export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from '../createWalletClient-d612fe08.js';
2
+ export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from '../webSocket-7f88e9e0.js';
3
3
  import '../chains.js';
4
4
  import '../rpc-b77c5aee.js';
5
5
  import '@wagmi/chains';
6
- import '../eip1193-100454ab.js';
6
+ import '../eip1193-020a6f13.js';
7
7
  import '../rpc-26932bae.js';
@@ -8,8 +8,8 @@ import {
8
8
  fallback,
9
9
  http,
10
10
  webSocket
11
- } from "../chunk-BIQ5KSX5.js";
12
- import "../chunk-ALVD6MNU.js";
11
+ } from "../chunk-375SRM5R.js";
12
+ import "../chunk-7H5SPKXN.js";
13
13
  export {
14
14
  createClient,
15
15
  createPublicClient,
@@ -1,5 +1,5 @@
1
1
  import { Chain } from './chains.js';
2
- import { R as Requests, P as PublicRequests, T as TestRequests, S as SignableRequests, b as WalletRequests } from './eip1193-100454ab.js';
2
+ import { R as Requests, P as PublicRequests, T as TestRequests, S as SignableRequests, b as WalletRequests } from './eip1193-020a6f13.js';
3
3
 
4
4
  type BaseRpcRequests = {
5
5
  request(...args: any): Promise<any>;
@@ -405,7 +405,7 @@ type PublicRequests = {
405
405
  * */
406
406
  method: 'eth_getTransactionCount';
407
407
  params: [address: Address, block: RpcBlockNumber | BlockTag | RpcBlockIdentifier];
408
- }): Promise<Quantity | null>;
408
+ }): Promise<Quantity>;
409
409
  request(args: {
410
410
  /**
411
411
  * @description Returns the receipt of a transaction specified by hash
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, e as GetBalanceResponse, f as GetBlockArgs, g as GetBlockNumberArgs, h as GetBlockNumberResponse, i as GetBlockResponse, j as GetBlockTransactionCountArgs, k as GetBlockTransactionCountResponse, l as GetFeeHistoryArgs, m as GetFeeHistoryResponse, n as GetFilterChangesArgs, o as GetFilterChangesResponse, p as GetFilterLogsArgs, q as GetFilterLogsResponse, r as GetGasPriceResponse, s as GetPermissionsResponse, t as GetTransactionArgs, u as GetTransactionConfirmationsArgs, v as GetTransactionConfirmationsResponse, w as GetTransactionCountArgs, x as GetTransactionCountResponse, z as GetTransactionReceiptArgs, A as GetTransactionReceiptResponse, y as GetTransactionResponse, I as ImpersonateAccountArgs, B as IncreaseTimeArgs, M as MineArgs, O as OnBlock, F as OnBlockNumber, H as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, N as RequestPermissionsResponse, R as ResetArgs, P as RevertArgs, S as SendTransactionArgs, Q as SendTransactionResponse, T as SendUnsignedTransactionArgs, U as SendUnsignedTransactionResponse, V as SetBalanceArgs, W as SetBlockGasLimitArgs, $ as SetBlockTimestampIntervalArgs, X as SetCodeArgs, Y as SetCoinbaseArgs, Z as SetIntervalMiningArgs, _ as SetMinGasPriceArgs, a1 as SetNextBlockBaseFeePerGasArgs, a0 as SetNextBlockTimestampArgs, a2 as SetNonceArgs, a3 as SetStorageAtArgs, a4 as SignMessageArgs, a5 as SignMessageResponse, a6 as StopImpersonatingAccountArgs, a7 as SwitchChainArgs, a8 as UninstallFilterArgs, a9 as UninstallFilterResponse, aa as WaitForTransactionReceiptArgs, ab as WaitForTransactionReceiptResponse, ac as WatchAssetArgs, ad as WatchAssetResponse, ae as WatchBlockNumberArgs, af as WatchBlocksArgs, ag as WatchPendingTransactionsArgs, ah as addChain, ai as call, aj as createBlockFilter, ak as createPendingTransactionFilter, am as dropTransaction, al as estimateGas, an as getAccounts, ao as getAutomine, ap as getBalance, aq as getBlock, ar as getBlockNumber, as as getBlockTransactionCount, at as getChainId, au as getFeeHistory, av as getFilterChanges, aw as getFilterLogs, ax as getGasPrice, ay as getPermissions, az as getTransaction, aA as getTransactionConfirmations, aB as getTransactionCount, aC as getTransactionReceipt, aD as getTxpoolContent, aE as getTxpoolStatus, aF as impersonateAccount, aG as increaseTime, aH as inspectTxpool, aI as mine, aJ as removeBlockTimestampInterval, aL as requestAccounts, aM as requestPermissions, aK as reset, aN as revert, aO as sendTransaction, aP as sendUnsignedTransaction, aQ as setAutomine, aR as setBalance, aS as setBlockGasLimit, aT as setBlockTimestampInterval, aU as setCode, aV as setCoinbase, aW as setIntervalMining, aX as setLoggingEnabled, aY as setMinGasPrice, aZ as setNextBlockBaseFeePerGas, a_ as setNextBlockTimestamp, a$ as setNonce, b0 as setStorageAt, b1 as signMessage, b2 as snapshot, b3 as stopImpersonatingAccount, b4 as switchChain, b5 as uninstallFilter, b6 as waitForTransactionReceipt, b7 as watchAsset, b8 as watchBlockNumber, b9 as watchBlocks, ba as watchPendingTransactions } from './watchAsset-e99e744d.js';
2
- export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from './createWalletClient-b5c3c89e.js';
3
- export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from './webSocket-f4abf66c.js';
1
+ export { C as CallArgs, a as CallResponse, b as CreateBlockFilterResponse, c as CreatePendingTransactionFilterResponse, D as DropTransactionArgs, E as EstimateGasArgs, d as EstimateGasResponse, G as GetBalanceArgs, e as GetBalanceResponse, f as GetBlockArgs, g as GetBlockNumberArgs, h as GetBlockNumberResponse, i as GetBlockResponse, j as GetBlockTransactionCountArgs, k as GetBlockTransactionCountResponse, l as GetFeeHistoryArgs, m as GetFeeHistoryResponse, n as GetFilterChangesArgs, o as GetFilterChangesResponse, p as GetFilterLogsArgs, q as GetFilterLogsResponse, r as GetGasPriceResponse, s as GetPermissionsResponse, t as GetTransactionArgs, u as GetTransactionConfirmationsArgs, v as GetTransactionConfirmationsResponse, w as GetTransactionCountArgs, x as GetTransactionCountResponse, z as GetTransactionReceiptArgs, A as GetTransactionReceiptResponse, y as GetTransactionResponse, I as ImpersonateAccountArgs, B as IncreaseTimeArgs, M as MineArgs, O as OnBlock, F as OnBlockNumber, H as OnBlockNumberResponse, J as OnBlockResponse, K as OnTransactions, L as OnTransactionsResponse, N as RequestPermissionsResponse, R as ResetArgs, P as RevertArgs, S as SendTransactionArgs, Q as SendTransactionResponse, T as SendUnsignedTransactionArgs, U as SendUnsignedTransactionResponse, V as SetBalanceArgs, W as SetBlockGasLimitArgs, $ as SetBlockTimestampIntervalArgs, X as SetCodeArgs, Y as SetCoinbaseArgs, Z as SetIntervalMiningArgs, _ as SetMinGasPriceArgs, a1 as SetNextBlockBaseFeePerGasArgs, a0 as SetNextBlockTimestampArgs, a2 as SetNonceArgs, a3 as SetStorageAtArgs, a4 as SignMessageArgs, a5 as SignMessageResponse, a6 as StopImpersonatingAccountArgs, a7 as SwitchChainArgs, a8 as UninstallFilterArgs, a9 as UninstallFilterResponse, aa as WaitForTransactionReceiptArgs, ab as WaitForTransactionReceiptResponse, ac as WatchAssetArgs, ad as WatchAssetResponse, ae as WatchBlockNumberArgs, af as WatchBlocksArgs, ag as WatchPendingTransactionsArgs, ah as addChain, ai as call, aj as createBlockFilter, ak as createPendingTransactionFilter, am as dropTransaction, al as estimateGas, an as getAccounts, ao as getAutomine, ap as getBalance, aq as getBlock, ar as getBlockNumber, as as getBlockTransactionCount, at as getChainId, au as getFeeHistory, av as getFilterChanges, aw as getFilterLogs, ax as getGasPrice, ay as getPermissions, az as getTransaction, aA as getTransactionConfirmations, aB as getTransactionCount, aC as getTransactionReceipt, aD as getTxpoolContent, aE as getTxpoolStatus, aF as impersonateAccount, aG as increaseTime, aH as inspectTxpool, aI as mine, aJ as removeBlockTimestampInterval, aL as requestAccounts, aM as requestPermissions, aK as reset, aN as revert, aO as sendTransaction, aP as sendUnsignedTransaction, aQ as setAutomine, aR as setBalance, aS as setBlockGasLimit, aT as setBlockTimestampInterval, aU as setCode, aV as setCoinbase, aW as setIntervalMining, aX as setLoggingEnabled, aY as setMinGasPrice, aZ as setNextBlockBaseFeePerGas, a_ as setNextBlockTimestamp, a$ as setNonce, b0 as setStorageAt, b1 as signMessage, b2 as snapshot, b3 as stopImpersonatingAccount, b4 as switchChain, b5 as uninstallFilter, b6 as waitForTransactionReceipt, b7 as watchAsset, b8 as watchBlockNumber, b9 as watchBlocks, ba as watchPendingTransactions } from './watchAsset-dc7dcdd9.js';
2
+ export { C as Client, a as ClientConfig, P as PublicClient, b as PublicClientConfig, T as TestClient, c as TestClientConfig, d as Transport, e as TransportConfig, W as WalletClient, f as WalletClientConfig, g as createClient, h as createPublicClient, i as createTestClient, j as createTransport, k as createWalletClient } from './createWalletClient-d612fe08.js';
3
+ export { C as CustomTransport, a as CustomTransportConfig, F as FallbackTransport, b as FallbackTransportConfig, H as HttpTransport, c as HttpTransportConfig, W as WebSocketTransport, d as WebSocketTransportConfig, e as custom, f as fallback, h as http, w as webSocket } from './webSocket-7f88e9e0.js';
4
4
  import { H as Hex, A as Address, a as Hash, B as ByteArray, b as BlockTag } from './rpc-b77c5aee.js';
5
5
  export { c as AccessList, A as Address, d as Block, f as BlockIdentifier, h as BlockNumber, b as BlockTag, B as ByteArray, F as FeeHistory, i as FeeValues, j as FeeValuesEIP1559, k as FeeValuesLegacy, a as Hash, H as Hex, L as Log, R as RpcBlock, l as RpcBlockIdentifier, m as RpcBlockNumber, n as RpcFeeHistory, o as RpcFeeValues, p as RpcLog, q as RpcTransaction, r as RpcTransactionReceipt, s as RpcTransactionRequest, u as RpcUncle, D as Transaction, E as TransactionBase, G as TransactionEIP1559, I as TransactionEIP2930, J as TransactionLegacy, T as TransactionReceipt, v as TransactionRequest, x as TransactionRequestBase, y as TransactionRequestEIP1559, z as TransactionRequestEIP2930, C as TransactionRequestLegacy, U as Uncle, e as etherUnits, g as gweiUnits, t as transactionType, w as weiUnits } from './rpc-b77c5aee.js';
6
- export { E as EncodeRlpResponse, G as GetContractAddressOptions, b as GetCreate2AddressOptions, a as GetCreateAddressOptions, e as boolToBytes, f as boolToHex, g as bytesToBigint, h as bytesToBool, c as bytesToHex, i as bytesToNumber, d as bytesToString, j as decodeAbi, k as decodeBytes, l as decodeErrorResult, m as decodeFunctionData, n as decodeFunctionResult, o as decodeHex, p as decodeRlp, q as encodeAbi, r as encodeBytes, s as encodeDeployData, t as encodeErrorResult, u as encodeEventTopics, v as encodeFunctionData, w as encodeFunctionResult, x as encodeHex, y as encodeRlp, H as formatEther, Y as formatGwei, Z as formatUnit, z as getAddress, A as getContractAddress, C as getCreate2Address, B as getCreateAddress, D as getEventSignature, F as getFunctionSignature, M as hexToBigInt, N as hexToBool, O as hexToBytes, _ as hexToNumber, P as hexToString, I as isAddress, J as isAddressEqual, K as isBytes, L as isHex, Q as keccak256, R as numberToBytes, $ as numberToHex, S as pad, T as padBytes, U as padHex, V as parseEther, W as parseGwei, X as parseUnit, a0 as size, a1 as slice, a2 as sliceBytes, a3 as sliceHex, a4 as stringToBytes, a5 as stringToHex, a6 as trim } from './parseGwei-14f716fc.js';
6
+ export { E as EncodeRlpResponse, G as GetContractAddressOptions, b as GetCreate2AddressOptions, a as GetCreateAddressOptions, e as boolToBytes, f as boolToHex, g as bytesToBigint, h as bytesToBool, c as bytesToHex, i as bytesToNumber, d as bytesToString, j as decodeAbi, k as decodeBytes, l as decodeErrorResult, m as decodeFunctionData, n as decodeFunctionResult, o as decodeHex, p as decodeRlp, q as encodeAbi, r as encodeBytes, s as encodeDeployData, t as encodeErrorResult, u as encodeEventTopics, v as encodeFunctionData, w as encodeFunctionResult, x as encodeHex, y as encodeRlp, H as formatEther, Y as formatGwei, Z as formatUnit, z as getAddress, A as getContractAddress, C as getCreate2Address, B as getCreateAddress, D as getEventSignature, F as getFunctionSignature, M as hexToBigInt, N as hexToBool, O as hexToBytes, _ as hexToNumber, P as hexToString, I as isAddress, J as isAddressEqual, K as isBytes, L as isHex, Q as keccak256, R as numberToBytes, $ as numberToHex, S as pad, T as padBytes, U as padHex, V as parseEther, W as parseGwei, X as parseUnit, a0 as size, a1 as slice, a2 as sliceBytes, a3 as sliceHex, a4 as stringToBytes, a5 as stringToHex, a6 as trim } from './parseGwei-64031f5e.js';
7
7
  export { F as FormattedBlock, a as FormattedTransaction, b as FormattedTransactionRequest, f as formatBlock, c as formatTransaction, d as formatTransactionRequest } from './transactionRequest-3e463099.js';
8
8
  import './chains.js';
9
9
  import '@wagmi/chains';
10
- import './eip1193-100454ab.js';
10
+ import './eip1193-020a6f13.js';
11
11
  import './rpc-26932bae.js';
12
12
  import 'abitype';
13
13
 
@@ -30,11 +30,15 @@ declare class BaseError extends Error {
30
30
 
31
31
  declare class AbiConstructorNotFoundError extends BaseError {
32
32
  name: string;
33
- constructor();
33
+ constructor({ docsPath }: {
34
+ docsPath: string;
35
+ });
34
36
  }
35
37
  declare class AbiConstructorParamsNotFoundError extends BaseError {
36
38
  name: string;
37
- constructor();
39
+ constructor({ docsPath }: {
40
+ docsPath: string;
41
+ });
38
42
  }
39
43
  declare class AbiDecodingDataSizeInvalidError extends BaseError {
40
44
  name: string;
@@ -57,39 +61,57 @@ declare class AbiEncodingLengthMismatchError extends BaseError {
57
61
  }
58
62
  declare class AbiErrorInputsNotFoundError extends BaseError {
59
63
  name: string;
60
- constructor(errorName: string);
64
+ constructor(errorName: string, { docsPath }: {
65
+ docsPath: string;
66
+ });
61
67
  }
62
68
  declare class AbiErrorNotFoundError extends BaseError {
63
69
  name: string;
64
- constructor(errorName: string);
70
+ constructor(errorName: string, { docsPath }: {
71
+ docsPath: string;
72
+ });
65
73
  }
66
74
  declare class AbiErrorSignatureNotFoundError extends BaseError {
67
75
  name: string;
68
- constructor(signature: Hex);
76
+ constructor(signature: Hex, { docsPath }: {
77
+ docsPath: string;
78
+ });
69
79
  }
70
80
  declare class AbiEventNotFoundError extends BaseError {
71
81
  name: string;
72
- constructor(eventName: string);
82
+ constructor(eventName: string, { docsPath }: {
83
+ docsPath: string;
84
+ });
73
85
  }
74
86
  declare class AbiFunctionNotFoundError extends BaseError {
75
87
  name: string;
76
- constructor(functionName: string);
88
+ constructor(functionName: string, { docsPath }: {
89
+ docsPath: string;
90
+ });
77
91
  }
78
92
  declare class AbiFunctionOutputsNotFoundError extends BaseError {
79
93
  name: string;
80
- constructor(functionName: string);
94
+ constructor(functionName: string, { docsPath }: {
95
+ docsPath: string;
96
+ });
81
97
  }
82
98
  declare class AbiFunctionSignatureNotFoundError extends BaseError {
83
99
  name: string;
84
- constructor(signature: Hex);
100
+ constructor(signature: Hex, { docsPath }: {
101
+ docsPath: string;
102
+ });
85
103
  }
86
104
  declare class InvalidAbiEncodingTypeError extends BaseError {
87
105
  name: string;
88
- constructor(type: string);
106
+ constructor(type: string, { docsPath }: {
107
+ docsPath: string;
108
+ });
89
109
  }
90
110
  declare class InvalidAbiDecodingTypeError extends BaseError {
91
111
  name: string;
92
- constructor(type: string);
112
+ constructor(type: string, { docsPath }: {
113
+ docsPath: string;
114
+ });
93
115
  }
94
116
  declare class InvalidArrayError extends BaseError {
95
117
  name: string;
@@ -97,7 +119,9 @@ declare class InvalidArrayError extends BaseError {
97
119
  }
98
120
  declare class InvalidDefinitionTypeError extends BaseError {
99
121
  name: string;
100
- constructor(type: string);
122
+ constructor(type: string, { docsPath }: {
123
+ docsPath: string;
124
+ });
101
125
  }
102
126
 
103
127
  declare class InvalidAddressError extends BaseError {
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ import {
57
57
  watchBlockNumber,
58
58
  watchBlocks,
59
59
  watchPendingTransactions
60
- } from "./chunk-N6PIT2C5.js";
60
+ } from "./chunk-6BXRN6CQ.js";
61
61
  import {
62
62
  createClient,
63
63
  createPublicClient,
@@ -68,7 +68,7 @@ import {
68
68
  fallback,
69
69
  http,
70
70
  webSocket
71
- } from "./chunk-BIQ5KSX5.js";
71
+ } from "./chunk-375SRM5R.js";
72
72
  import {
73
73
  boolToBytes,
74
74
  boolToHex,
@@ -134,7 +134,7 @@ import {
134
134
  transactionType,
135
135
  trim,
136
136
  weiUnits
137
- } from "./chunk-4Z43OTO6.js";
137
+ } from "./chunk-26WUARDL.js";
138
138
  import {
139
139
  AbiConstructorNotFoundError,
140
140
  AbiConstructorParamsNotFoundError,
@@ -187,7 +187,7 @@ import {
187
187
  UrlRequiredError,
188
188
  WaitForTransactionReceiptTimeoutError,
189
189
  WebSocketRequestError
190
- } from "./chunk-ALVD6MNU.js";
190
+ } from "./chunk-7H5SPKXN.js";
191
191
  export {
192
192
  AbiConstructorNotFoundError,
193
193
  AbiConstructorParamsNotFoundError,
@@ -95,7 +95,7 @@ type ExtractEventArgsFromAbi<TAbi extends Abi | readonly unknown[], TFunctionNam
95
95
  declare function decodeAbi<TParams extends readonly AbiParameter[]>({ data, params, }: {
96
96
  data: Hex;
97
97
  params: TParams;
98
- }): AbiParametersToPrimitiveTypes<TParams>;
98
+ }): AbiParametersToPrimitiveTypes<TParams> | undefined;
99
99
 
100
100
  declare function decodeErrorResult({ abi, data }: {
101
101
  abi: Abi;
@@ -1,4 +1,4 @@
1
- export { E as EncodeRlpResponse, G as GetContractAddressOptions, b as GetCreate2AddressOptions, a as GetCreateAddressOptions, e as boolToBytes, f as boolToHex, g as bytesToBigint, h as bytesToBool, c as bytesToHex, i as bytesToNumber, d as bytesToString, j as decodeAbi, k as decodeBytes, l as decodeErrorResult, m as decodeFunctionData, n as decodeFunctionResult, o as decodeHex, p as decodeRlp, q as encodeAbi, r as encodeBytes, s as encodeDeployData, t as encodeErrorResult, u as encodeEventTopics, v as encodeFunctionData, w as encodeFunctionResult, x as encodeHex, y as encodeRlp, H as formatEther, Y as formatGwei, Z as formatUnit, z as getAddress, A as getContractAddress, C as getCreate2Address, B as getCreateAddress, D as getEventSignature, F as getFunctionSignature, M as hexToBigInt, N as hexToBool, O as hexToBytes, _ as hexToNumber, P as hexToString, I as isAddress, J as isAddressEqual, K as isBytes, L as isHex, Q as keccak256, R as numberToBytes, $ as numberToHex, S as pad, T as padBytes, U as padHex, V as parseEther, W as parseGwei, X as parseUnit, a0 as size, a1 as slice, a2 as sliceBytes, a3 as sliceHex, a4 as stringToBytes, a5 as stringToHex, a6 as trim } from '../parseGwei-14f716fc.js';
1
+ export { E as EncodeRlpResponse, G as GetContractAddressOptions, b as GetCreate2AddressOptions, a as GetCreateAddressOptions, e as boolToBytes, f as boolToHex, g as bytesToBigint, h as bytesToBool, c as bytesToHex, i as bytesToNumber, d as bytesToString, j as decodeAbi, k as decodeBytes, l as decodeErrorResult, m as decodeFunctionData, n as decodeFunctionResult, o as decodeHex, p as decodeRlp, q as encodeAbi, r as encodeBytes, s as encodeDeployData, t as encodeErrorResult, u as encodeEventTopics, v as encodeFunctionData, w as encodeFunctionResult, x as encodeHex, y as encodeRlp, H as formatEther, Y as formatGwei, Z as formatUnit, z as getAddress, A as getContractAddress, C as getCreate2Address, B as getCreateAddress, D as getEventSignature, F as getFunctionSignature, M as hexToBigInt, N as hexToBool, O as hexToBytes, _ as hexToNumber, P as hexToString, I as isAddress, J as isAddressEqual, K as isBytes, L as isHex, Q as keccak256, R as numberToBytes, $ as numberToHex, S as pad, T as padBytes, U as padHex, V as parseEther, W as parseGwei, X as parseUnit, a0 as size, a1 as slice, a2 as sliceBytes, a3 as sliceHex, a4 as stringToBytes, a5 as stringToHex, a6 as trim } from '../parseGwei-64031f5e.js';
2
2
  export { B as BlockFormatter, E as ExtractFormatter, e as Formatted, F as FormattedBlock, a as FormattedTransaction, h as FormattedTransactionReceipt, b as FormattedTransactionRequest, g as TransactionFormatter, i as TransactionReceiptFormatter, T as TransactionRequestFormatter, j as format, f as formatBlock, c as formatTransaction, d as formatTransactionRequest } from '../transactionRequest-3e463099.js';
3
3
  export { r as rpc } from '../rpc-26932bae.js';
4
4
  import 'abitype';
@@ -63,11 +63,11 @@ import {
63
63
  stringToBytes,
64
64
  stringToHex,
65
65
  trim
66
- } from "../chunk-4Z43OTO6.js";
66
+ } from "../chunk-26WUARDL.js";
67
67
  import {
68
68
  buildRequest,
69
69
  rpc
70
- } from "../chunk-ALVD6MNU.js";
70
+ } from "../chunk-7H5SPKXN.js";
71
71
  export {
72
72
  boolToBytes,
73
73
  boolToHex,
@@ -1,8 +1,8 @@
1
1
  import { Chain, Formatter } from './chains.js';
2
2
  import { H as Hex, b as BlockTag, M as MergeIntersectionProperties, v as TransactionRequest, K as EstimateGasParameters, A as Address, a as Hash, F as FeeHistory, L as Log, r as RpcTransactionReceipt, T as TransactionReceipt, N as TransactionType, D as Transaction, q as RpcTransaction, Q as Quantity, B as ByteArray } from './rpc-b77c5aee.js';
3
- import { P as PublicClient, T as TestClient, W as WalletClient } from './createWalletClient-b5c3c89e.js';
3
+ import { P as PublicClient, T as TestClient, W as WalletClient } from './createWalletClient-d612fe08.js';
4
4
  import { T as TransactionRequestFormatter, e as Formatted, F as FormattedBlock, B as BlockFormatter, a as FormattedTransaction, g as TransactionFormatter, h as FormattedTransactionReceipt, i as TransactionReceiptFormatter, E as ExtractFormatter } from './transactionRequest-3e463099.js';
5
- import { W as WalletPermission, a as WatchAssetParams } from './eip1193-100454ab.js';
5
+ import { W as WalletPermission, a as WatchAssetParams } from './eip1193-020a6f13.js';
6
6
 
7
7
  type FilterType = 'transaction' | 'block' | 'event';
8
8
  type Filter<TFilterType extends FilterType = 'event'> = {
@@ -1,4 +1,4 @@
1
- import { e as TransportConfig, d as Transport, B as BaseRpcRequests } from './createWalletClient-b5c3c89e.js';
1
+ import { e as TransportConfig, d as Transport, B as BaseRpcRequests } from './createWalletClient-d612fe08.js';
2
2
  import { a as Hash } from './rpc-b77c5aee.js';
3
3
  import { R as RpcResponse } from './rpc-26932bae.js';
4
4
 
package/dist/window.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { R as Requests, E as Events } from './eip1193-100454ab.js';
1
+ import { R as Requests, E as Events } from './eip1193-020a6f13.js';
2
2
  import './rpc-b77c5aee.js';
3
3
 
4
4
  type WindowProvider = Requests & Events;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript (& JavaScript) Interface for Ethereum",
4
- "version": "0.0.1-alpha.8",
4
+ "version": "0.0.1-alpha.9",
5
5
  "files": [
6
6
  "/actions",
7
7
  "/chains",