viem 0.0.1-alpha.4 → 0.0.1-alpha.6
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/actions/index.d.ts +5 -5
- package/dist/actions/index.js +3 -3
- package/dist/chains.d.ts +1 -1
- package/dist/chains.js +2 -2
- package/dist/{chunk-ZGVHEFCJ.js → chunk-2ISXYVSQ.js} +1 -1
- package/dist/{chunk-ROF2KQ2X.js → chunk-JND4MCSB.js} +47 -1
- package/dist/{chunk-COHLCIQM.js → chunk-LZSCKQVJ.js} +31 -1
- package/dist/{chunk-43X52QQL.js → chunk-WOXHZO4H.js} +2 -2
- package/dist/clients/index.d.ts +4 -4
- package/dist/clients/index.js +2 -2
- package/dist/{createWalletClient-15ad1601.d.ts → createWalletClient-b5c3c89e.d.ts} +1 -1
- package/dist/{eip1193-8b4d90ce.d.ts → eip1193-100454ab.d.ts} +1 -1
- package/dist/index.d.ts +25 -9
- package/dist/index.js +16 -4
- package/dist/{parseGwei-a952d720.d.ts → parseGwei-0c9cad8a.d.ts} +46 -2
- package/dist/{rpc-15b85963.d.ts → rpc-b77c5aee.d.ts} +1 -1
- package/dist/{transactionRequest-f538ea86.d.ts → transactionRequest-3e463099.d.ts} +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +6 -2
- package/dist/{watchAsset-0c9d01e2.d.ts → watchAsset-e99e744d.d.ts} +4 -4
- package/dist/{webSocket-b55b0951.d.ts → webSocket-f4abf66c.d.ts} +2 -2
- package/dist/window.d.ts +2 -2
- package/package.json +1 -1
package/dist/actions/index.d.ts
CHANGED
@@ -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-
|
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';
|
2
2
|
import '../chains.js';
|
3
|
-
import '../rpc-
|
3
|
+
import '../rpc-b77c5aee.js';
|
4
4
|
import '@wagmi/chains';
|
5
|
-
import '../createWalletClient-
|
6
|
-
import '../eip1193-
|
7
|
-
import '../transactionRequest-
|
5
|
+
import '../createWalletClient-b5c3c89e.js';
|
6
|
+
import '../eip1193-100454ab.js';
|
7
|
+
import '../transactionRequest-3e463099.js';
|
package/dist/actions/index.js
CHANGED
@@ -58,9 +58,9 @@ import {
|
|
58
58
|
watchBlockNumber,
|
59
59
|
watchBlocks,
|
60
60
|
watchPendingTransactions
|
61
|
-
} from "../chunk-
|
62
|
-
import "../chunk-
|
63
|
-
import "../chunk-
|
61
|
+
} from "../chunk-WOXHZO4H.js";
|
62
|
+
import "../chunk-JND4MCSB.js";
|
63
|
+
import "../chunk-LZSCKQVJ.js";
|
64
64
|
export {
|
65
65
|
addChain,
|
66
66
|
call,
|
package/dist/chains.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { R as RpcBlock, d as Block, q as RpcTransaction, D as Transaction, r as RpcTransactionReceipt, T as TransactionReceipt, v as TransactionRequest, s as RpcTransactionRequest, N as TransactionType,
|
1
|
+
import { R as RpcBlock, d as Block, q as RpcTransaction, D as Transaction, r as RpcTransactionReceipt, T as TransactionReceipt, v as TransactionRequest, s as RpcTransactionRequest, N as TransactionType, H as Hex } from './rpc-b77c5aee.js';
|
2
2
|
import { Chain as Chain$1 } from '@wagmi/chains';
|
3
3
|
|
4
4
|
type Formatter<TSource = any, TTarget = any> = (value: TSource & {
|
package/dist/chains.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
import {
|
2
|
+
AbiConstructorNotFoundError,
|
3
|
+
AbiConstructorParamsNotFoundError,
|
2
4
|
AbiDecodingDataSizeInvalidError,
|
3
5
|
AbiEncodingArrayLengthMismatchError,
|
4
6
|
AbiEncodingLengthMismatchError,
|
@@ -17,7 +19,7 @@ import {
|
|
17
19
|
InvalidHexValueError,
|
18
20
|
OffsetOutOfBoundsError,
|
19
21
|
SizeExceedsPaddingSizeError
|
20
|
-
} from "./chunk-
|
22
|
+
} from "./chunk-LZSCKQVJ.js";
|
21
23
|
|
22
24
|
// src/utils/data/concat.ts
|
23
25
|
function concat(values) {
|
@@ -959,6 +961,28 @@ function decodeFunctionResult({
|
|
959
961
|
return values.length > 1 ? values : values.length === 1 ? values[0] : void 0;
|
960
962
|
}
|
961
963
|
|
964
|
+
// src/utils/abi/encodeDeployData.ts
|
965
|
+
function encodeDeployData({
|
966
|
+
abi,
|
967
|
+
args,
|
968
|
+
bytecode
|
969
|
+
}) {
|
970
|
+
if (!args || args.length === 0)
|
971
|
+
return bytecode;
|
972
|
+
const description = abi.find((x) => "type" in x && x.type === "constructor");
|
973
|
+
if (!description)
|
974
|
+
throw new AbiConstructorNotFoundError();
|
975
|
+
if (!("inputs" in description))
|
976
|
+
throw new AbiConstructorParamsNotFoundError();
|
977
|
+
if (!description.inputs || description.inputs.length === 0)
|
978
|
+
throw new AbiConstructorParamsNotFoundError();
|
979
|
+
const data = encodeAbi({
|
980
|
+
params: description.inputs,
|
981
|
+
values: args
|
982
|
+
});
|
983
|
+
return concatHex([bytecode, data]);
|
984
|
+
}
|
985
|
+
|
962
986
|
// src/utils/abi/encodeFunctionData.ts
|
963
987
|
function encodeFunctionData({
|
964
988
|
abi,
|
@@ -977,6 +1001,26 @@ function encodeFunctionData({
|
|
977
1001
|
return concatHex([signature, data ?? "0x"]);
|
978
1002
|
}
|
979
1003
|
|
1004
|
+
// src/utils/abi/encodeFunctionResult.ts
|
1005
|
+
function encodeFunctionResult({
|
1006
|
+
abi,
|
1007
|
+
functionName,
|
1008
|
+
result
|
1009
|
+
}) {
|
1010
|
+
const description = abi.find((x) => "name" in x && x.name === functionName);
|
1011
|
+
if (!description)
|
1012
|
+
throw new AbiFunctionNotFoundError(functionName);
|
1013
|
+
if (!("outputs" in description))
|
1014
|
+
throw new AbiFunctionOutputsNotFoundError(functionName);
|
1015
|
+
let values = Array.isArray(result) ? result : [result];
|
1016
|
+
if (description.outputs.length === 0 && !values[0])
|
1017
|
+
values = [];
|
1018
|
+
const data = encodeAbi({ params: description.outputs, values });
|
1019
|
+
if (!data)
|
1020
|
+
return "0x";
|
1021
|
+
return data;
|
1022
|
+
}
|
1023
|
+
|
980
1024
|
// src/constants.ts
|
981
1025
|
var etherUnits = {
|
982
1026
|
gwei: 9,
|
@@ -1210,7 +1254,9 @@ export {
|
|
1210
1254
|
decodeAbi,
|
1211
1255
|
decodeFunctionData,
|
1212
1256
|
decodeFunctionResult,
|
1257
|
+
encodeDeployData,
|
1213
1258
|
encodeFunctionData,
|
1259
|
+
encodeFunctionResult,
|
1214
1260
|
etherUnits,
|
1215
1261
|
gweiUnits,
|
1216
1262
|
weiUnits,
|
@@ -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.
|
12
|
+
version: "0.0.1-alpha.6",
|
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",
|
@@ -157,6 +157,34 @@ var BaseError = class extends Error {
|
|
157
157
|
};
|
158
158
|
|
159
159
|
// src/errors/abi.ts
|
160
|
+
var AbiConstructorNotFoundError = class extends BaseError {
|
161
|
+
constructor() {
|
162
|
+
super(
|
163
|
+
[
|
164
|
+
"Constructor arguments were provided (`args`), but a constructor was not found on the ABI.",
|
165
|
+
"Make sure you are using the correct ABI and that the constructor exists on it."
|
166
|
+
].join("\n"),
|
167
|
+
{
|
168
|
+
docsPath: "/docs/contract/encodeDeployData"
|
169
|
+
}
|
170
|
+
);
|
171
|
+
__publicField(this, "name", "AbiConstructorNotFoundError");
|
172
|
+
}
|
173
|
+
};
|
174
|
+
var AbiConstructorParamsNotFoundError = class extends BaseError {
|
175
|
+
constructor() {
|
176
|
+
super(
|
177
|
+
[
|
178
|
+
"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.",
|
179
|
+
"Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."
|
180
|
+
].join("\n"),
|
181
|
+
{
|
182
|
+
docsPath: "/docs/contract/encodeDeployData"
|
183
|
+
}
|
184
|
+
);
|
185
|
+
__publicField(this, "name", "AbiConstructorParamsNotFoundError");
|
186
|
+
}
|
187
|
+
};
|
160
188
|
var AbiDecodingDataSizeInvalidError = class extends BaseError {
|
161
189
|
constructor(size) {
|
162
190
|
super(
|
@@ -960,6 +988,8 @@ var rpc = {
|
|
960
988
|
|
961
989
|
export {
|
962
990
|
BaseError,
|
991
|
+
AbiConstructorNotFoundError,
|
992
|
+
AbiConstructorParamsNotFoundError,
|
963
993
|
AbiDecodingDataSizeInvalidError,
|
964
994
|
AbiEncodingArrayLengthMismatchError,
|
965
995
|
AbiEncodingLengthMismatchError,
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
getAddress,
|
12
12
|
hexToNumber,
|
13
13
|
numberToHex
|
14
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-JND4MCSB.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-
|
25
|
+
} from "./chunk-LZSCKQVJ.js";
|
26
26
|
|
27
27
|
// src/actions/public/call.ts
|
28
28
|
async function call(client, {
|
package/dist/clients/index.d.ts
CHANGED
@@ -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-
|
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-
|
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';
|
3
3
|
import '../chains.js';
|
4
|
-
import '../rpc-
|
4
|
+
import '../rpc-b77c5aee.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import '../eip1193-
|
6
|
+
import '../eip1193-100454ab.js';
|
7
7
|
import '../rpc-26932bae.js';
|
package/dist/clients/index.js
CHANGED
@@ -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-
|
2
|
+
import { R as Requests, P as PublicRequests, T as TestRequests, S as SignableRequests, b as WalletRequests } from './eip1193-100454ab.js';
|
3
3
|
|
4
4
|
type BaseRpcRequests = {
|
5
5
|
request(...args: any): Promise<any>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { A as Address,
|
1
|
+
import { A as Address, a as Hash, Q as Quantity, s as RpcTransactionRequest, m as RpcBlockNumber, b as BlockTag, l as RpcBlockIdentifier, H as Hex, P as RpcEstimateGasParameters, n as RpcFeeHistory, R as RpcBlock, p as RpcLog, q as RpcTransaction, r as RpcTransactionReceipt, u as RpcUncle } from './rpc-b77c5aee.js';
|
2
2
|
|
3
3
|
declare class RpcError extends Error {
|
4
4
|
code: number;
|
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-
|
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-
|
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-
|
4
|
-
import { A as Address,
|
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,
|
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 decodeFunctionData, m as decodeFunctionResult, n as decodeHex, o as decodeRlp, p as encodeAbi, q as encodeBytes, r as
|
7
|
-
export { F as FormattedBlock, a as FormattedTransaction, b as FormattedTransactionRequest, f as formatBlock, c as formatTransaction, d as formatTransactionRequest } from './transactionRequest-
|
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';
|
4
|
+
import { H as Hex, A as Address, a as Hash, B as ByteArray, b as BlockTag } from './rpc-b77c5aee.js';
|
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 decodeFunctionData, m as decodeFunctionResult, n as decodeHex, o as decodeRlp, p as encodeAbi, q as encodeBytes, r as encodeDeployData, s as encodeFunctionData, t as encodeFunctionResult, u as encodeHex, v as encodeRlp, C as formatEther, V as formatGwei, W as formatUnit, w as getAddress, x as getContractAddress, z as getCreate2Address, y as getCreateAddress, A as getEventSignature, B as getFunctionSignature, J as hexToBigInt, K as hexToBool, L as hexToBytes, X as hexToNumber, M as hexToString, D as isAddress, F as isAddressEqual, H as isBytes, I as isHex, N as keccak256, O as numberToBytes, Y as numberToHex, P as pad, Q as padBytes, R as padHex, S as parseEther, T as parseGwei, U as parseUnit, Z as size, _ as slice, $ as sliceBytes, a0 as sliceHex, a1 as stringToBytes, a2 as stringToHex, a3 as trim } from './parseGwei-0c9cad8a.js';
|
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-
|
10
|
+
import './eip1193-100454ab.js';
|
11
11
|
import './rpc-26932bae.js';
|
12
12
|
import 'abitype';
|
13
13
|
|
@@ -28,6 +28,14 @@ declare class BaseError extends Error {
|
|
28
28
|
constructor(humanMessage: string, args?: BaseErrorArgs);
|
29
29
|
}
|
30
30
|
|
31
|
+
declare class AbiConstructorNotFoundError extends BaseError {
|
32
|
+
name: string;
|
33
|
+
constructor();
|
34
|
+
}
|
35
|
+
declare class AbiConstructorParamsNotFoundError extends BaseError {
|
36
|
+
name: string;
|
37
|
+
constructor();
|
38
|
+
}
|
31
39
|
declare class AbiDecodingDataSizeInvalidError extends BaseError {
|
32
40
|
name: string;
|
33
41
|
constructor(size: number);
|
@@ -51,6 +59,14 @@ declare class AbiFunctionNotFoundError extends BaseError {
|
|
51
59
|
name: string;
|
52
60
|
constructor(functionName: string);
|
53
61
|
}
|
62
|
+
declare class AbiFunctionOutputsNotFoundError extends BaseError {
|
63
|
+
name: string;
|
64
|
+
constructor(functionName: string);
|
65
|
+
}
|
66
|
+
declare class AbiFunctionSignatureNotFoundError extends BaseError {
|
67
|
+
name: string;
|
68
|
+
constructor(signature: Hex);
|
69
|
+
}
|
54
70
|
declare class InvalidAbiEncodingTypeError extends BaseError {
|
55
71
|
name: string;
|
56
72
|
constructor(type: string);
|
@@ -281,4 +297,4 @@ declare class UrlRequiredError extends BaseError {
|
|
281
297
|
constructor();
|
282
298
|
}
|
283
299
|
|
284
|
-
export { AbiDecodingDataSizeInvalidError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiFunctionNotFoundError, BaseError, BlockNotFoundError, DataLengthTooLongError, DataLengthTooShortError, HttpRequestError, InternalRpcError, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidAddressError, InvalidArrayError, InvalidBytesBooleanError, InvalidDefinitionTypeError, InvalidGasArgumentsError, InvalidHexBooleanError, InvalidHexValueError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, OffsetOutOfBoundsError, ParseRpcError, RequestError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, RpcRequestError, SizeExceedsPaddingSizeError, TimeoutError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionRejectedRpcError, UnknownRpcError, UrlRequiredError, WaitForTransactionReceiptTimeoutError, WebSocketRequestError };
|
300
|
+
export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BaseError, BlockNotFoundError, DataLengthTooLongError, DataLengthTooShortError, HttpRequestError, InternalRpcError, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidAddressError, InvalidArrayError, InvalidBytesBooleanError, InvalidDefinitionTypeError, InvalidGasArgumentsError, InvalidHexBooleanError, InvalidHexValueError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, OffsetOutOfBoundsError, ParseRpcError, RequestError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, RpcRequestError, SizeExceedsPaddingSizeError, TimeoutError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionRejectedRpcError, UnknownRpcError, UrlRequiredError, WaitForTransactionReceiptTimeoutError, WebSocketRequestError };
|
package/dist/index.js
CHANGED
@@ -57,7 +57,7 @@ import {
|
|
57
57
|
watchBlockNumber,
|
58
58
|
watchBlocks,
|
59
59
|
watchPendingTransactions
|
60
|
-
} from "./chunk-
|
60
|
+
} from "./chunk-WOXHZO4H.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-
|
71
|
+
} from "./chunk-2ISXYVSQ.js";
|
72
72
|
import {
|
73
73
|
boolToBytes,
|
74
74
|
boolToHex,
|
@@ -85,7 +85,9 @@ import {
|
|
85
85
|
decodeRlp,
|
86
86
|
encodeAbi,
|
87
87
|
encodeBytes,
|
88
|
+
encodeDeployData,
|
88
89
|
encodeFunctionData,
|
90
|
+
encodeFunctionResult,
|
89
91
|
encodeHex,
|
90
92
|
encodeRlp,
|
91
93
|
etherUnits,
|
@@ -129,12 +131,16 @@ import {
|
|
129
131
|
transactionType,
|
130
132
|
trim,
|
131
133
|
weiUnits
|
132
|
-
} from "./chunk-
|
134
|
+
} from "./chunk-JND4MCSB.js";
|
133
135
|
import {
|
136
|
+
AbiConstructorNotFoundError,
|
137
|
+
AbiConstructorParamsNotFoundError,
|
134
138
|
AbiDecodingDataSizeInvalidError,
|
135
139
|
AbiEncodingArrayLengthMismatchError,
|
136
140
|
AbiEncodingLengthMismatchError,
|
137
141
|
AbiFunctionNotFoundError,
|
142
|
+
AbiFunctionOutputsNotFoundError,
|
143
|
+
AbiFunctionSignatureNotFoundError,
|
138
144
|
BaseError,
|
139
145
|
BlockNotFoundError,
|
140
146
|
DataLengthTooLongError,
|
@@ -173,12 +179,16 @@ import {
|
|
173
179
|
UrlRequiredError,
|
174
180
|
WaitForTransactionReceiptTimeoutError,
|
175
181
|
WebSocketRequestError
|
176
|
-
} from "./chunk-
|
182
|
+
} from "./chunk-LZSCKQVJ.js";
|
177
183
|
export {
|
184
|
+
AbiConstructorNotFoundError,
|
185
|
+
AbiConstructorParamsNotFoundError,
|
178
186
|
AbiDecodingDataSizeInvalidError,
|
179
187
|
AbiEncodingArrayLengthMismatchError,
|
180
188
|
AbiEncodingLengthMismatchError,
|
181
189
|
AbiFunctionNotFoundError,
|
190
|
+
AbiFunctionOutputsNotFoundError,
|
191
|
+
AbiFunctionSignatureNotFoundError,
|
182
192
|
BaseError,
|
183
193
|
BlockNotFoundError,
|
184
194
|
DataLengthTooLongError,
|
@@ -243,7 +253,9 @@ export {
|
|
243
253
|
dropTransaction,
|
244
254
|
encodeAbi,
|
245
255
|
encodeBytes,
|
256
|
+
encodeDeployData,
|
246
257
|
encodeFunctionData,
|
258
|
+
encodeFunctionResult,
|
247
259
|
encodeHex,
|
248
260
|
encodeRlp,
|
249
261
|
estimateGas,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Abi, AbiFunction, ExtractAbiFunction, AbiParametersToPrimitiveTypes, AbiParameter, ExtractAbiFunctionNames } from 'abitype';
|
2
|
-
import {
|
2
|
+
import { H as Hex, A as Address, B as ByteArray } from './rpc-b77c5aee.js';
|
3
3
|
|
4
4
|
type ExtractArgsFromAbi<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAbiFunction extends AbiFunction & {
|
5
5
|
type: 'function';
|
@@ -17,6 +17,40 @@ type ExtractArgsFromAbi<TAbi extends Abi | readonly unknown[], TFunctionName ext
|
|
17
17
|
} : {
|
18
18
|
/** Arguments to pass contract method */ args: TArgs;
|
19
19
|
};
|
20
|
+
type ExtractConstructorArgsFromAbi<TAbi extends Abi | readonly unknown[], TAbiFunction extends AbiFunction & {
|
21
|
+
type: 'constructor';
|
22
|
+
} = TAbi extends Abi ? Extract<TAbi[number], {
|
23
|
+
type: 'constructor';
|
24
|
+
}> : AbiFunction & {
|
25
|
+
type: 'constructor';
|
26
|
+
}, TArgs = AbiParametersToPrimitiveTypes<TAbiFunction['inputs']>, FailedToParseArgs = ([TArgs] extends [never] ? true : false) | (readonly unknown[] extends TArgs ? true : false)> = true extends FailedToParseArgs ? {
|
27
|
+
/**
|
28
|
+
* Arguments to pass contract method
|
29
|
+
*
|
30
|
+
* Use a [const assertion](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) on {@link abi} for type inference.
|
31
|
+
*/
|
32
|
+
args?: readonly unknown[];
|
33
|
+
} : TArgs extends readonly [] ? {
|
34
|
+
args?: never;
|
35
|
+
} : {
|
36
|
+
/** Arguments to pass contract method */ args: TArgs;
|
37
|
+
};
|
38
|
+
type ExtractResultFromAbi<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAbiFunction extends AbiFunction & {
|
39
|
+
type: 'function';
|
40
|
+
} = TAbi extends Abi ? ExtractAbiFunction<TAbi, TFunctionName> : AbiFunction & {
|
41
|
+
type: 'function';
|
42
|
+
}, TArgs = AbiParametersToPrimitiveTypes<TAbiFunction['outputs']>, FailedToParseArgs = ([TArgs] extends [never] ? true : false) | (readonly unknown[] extends TArgs ? true : false)> = true extends FailedToParseArgs ? {
|
43
|
+
/**
|
44
|
+
* Arguments to pass contract method
|
45
|
+
*
|
46
|
+
* Use a [const assertion](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) on {@link abi} for type inference.
|
47
|
+
*/
|
48
|
+
result?: readonly unknown[];
|
49
|
+
} : TArgs extends readonly [] ? {
|
50
|
+
result?: never;
|
51
|
+
} : {
|
52
|
+
/** Arguments to pass contract method */ result: TArgs;
|
53
|
+
};
|
20
54
|
|
21
55
|
declare function decodeAbi<TParams extends readonly AbiParameter[]>({ data, params, }: {
|
22
56
|
data: Hex;
|
@@ -45,11 +79,21 @@ declare function encodeAbi<TParams extends readonly AbiParameter[]>({ params, va
|
|
45
79
|
values: AbiParametersToPrimitiveTypes<TParams>;
|
46
80
|
}): `0x${string}` | undefined;
|
47
81
|
|
82
|
+
declare function encodeDeployData<TAbi extends Abi = Abi>({ abi, args, bytecode, }: {
|
83
|
+
abi: TAbi;
|
84
|
+
bytecode: Hex;
|
85
|
+
} & ExtractConstructorArgsFromAbi<TAbi>): `0x${string}`;
|
86
|
+
|
48
87
|
declare function encodeFunctionData<TAbi extends Abi = Abi, TFunctionName extends ExtractAbiFunctionNames<TAbi> = any>({ abi, args, functionName, }: {
|
49
88
|
abi: TAbi;
|
50
89
|
functionName: TFunctionName;
|
51
90
|
} & ExtractArgsFromAbi<TAbi, TFunctionName>): `0x${string}`;
|
52
91
|
|
92
|
+
declare function encodeFunctionResult<TAbi extends Abi = Abi, TFunctionName extends ExtractAbiFunctionNames<TAbi> = any>({ abi, functionName, result, }: {
|
93
|
+
abi: TAbi;
|
94
|
+
functionName: TFunctionName;
|
95
|
+
} & ExtractResultFromAbi<TAbi, TFunctionName>): `0x${string}`;
|
96
|
+
|
53
97
|
declare function getAddress(address: Address): `0x${string}`;
|
54
98
|
|
55
99
|
type GetCreateAddressOptions = {
|
@@ -251,4 +295,4 @@ declare function parseEther(ether: `${number}`, unit?: 'wei' | 'gwei'): bigint;
|
|
251
295
|
|
252
296
|
declare function parseGwei(ether: `${number}`, unit?: 'wei'): bigint;
|
253
297
|
|
254
|
-
export {
|
298
|
+
export { sliceBytes as $, getEventSignature as A, getFunctionSignature as B, formatEther as C, isAddress as D, EncodeRlpResponse as E, isAddressEqual as F, GetContractAddressOptions as G, isBytes as H, isHex as I, hexToBigInt as J, hexToBool as K, hexToBytes as L, hexToString as M, keccak256 as N, numberToBytes as O, pad as P, padBytes as Q, padHex as R, parseEther as S, parseGwei as T, parseUnit as U, formatGwei as V, formatUnit as W, hexToNumber as X, numberToHex as Y, size as Z, slice as _, GetCreateAddressOptions as a, sliceHex as a0, stringToBytes as a1, stringToHex as a2, trim as a3, GetCreate2AddressOptions as b, bytesToHex as c, bytesToString as d, boolToBytes as e, boolToHex as f, bytesToBigint as g, bytesToBool as h, bytesToNumber as i, decodeAbi as j, decodeBytes as k, decodeFunctionData as l, decodeFunctionResult as m, decodeHex as n, decodeRlp as o, encodeAbi as p, encodeBytes as q, encodeDeployData as r, encodeFunctionData as s, encodeFunctionResult as t, encodeHex as u, encodeRlp as v, getAddress as w, getContractAddress as x, getCreateAddress as y, getCreate2Address as z };
|
@@ -289,4 +289,4 @@ type RpcTransactionReceipt = TransactionReceipt<Quantity, Index, Status, Transac
|
|
289
289
|
type RpcTransactionRequest = TransactionRequest<Quantity, Index>;
|
290
290
|
type RpcTransaction = TransactionLegacy<Quantity, Index, '0x0'> | TransactionEIP2930<Quantity, Index, '0x1'> | TransactionEIP1559<Quantity, Index, '0x2'>;
|
291
291
|
|
292
|
-
export { Address as A, ByteArray as B, TransactionRequestLegacy as C, Transaction as D, TransactionBase as E, FeeHistory as F, TransactionEIP1559 as G,
|
292
|
+
export { Address as A, ByteArray as B, TransactionRequestLegacy as C, Transaction as D, TransactionBase as E, FeeHistory as F, TransactionEIP1559 as G, Hex as H, TransactionEIP2930 as I, TransactionLegacy as J, EstimateGasParameters as K, Log as L, MergeIntersectionProperties as M, TransactionType$1 as N, OptionalNullable as O, RpcEstimateGasParameters as P, Quantity as Q, RpcBlock as R, TransactionReceipt as T, Uncle as U, Hash as a, BlockTag as b, AccessList as c, Block as d, etherUnits as e, BlockIdentifier as f, gweiUnits as g, BlockNumber as h, FeeValues as i, FeeValuesEIP1559 as j, FeeValuesLegacy as k, RpcBlockIdentifier as l, RpcBlockNumber as m, RpcFeeHistory as n, RpcFeeValues as o, RpcLog as p, RpcTransaction as q, RpcTransactionReceipt as r, RpcTransactionRequest as s, transactionType as t, RpcUncle as u, TransactionRequest as v, weiUnits as w, TransactionRequestBase as x, TransactionRequestEIP1559 as y, TransactionRequestEIP2930 as z };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { O as OptionalNullable, d as Block, R as RpcBlock, D as Transaction, q as RpcTransaction, T as TransactionReceipt, s as RpcTransactionRequest, v as TransactionRequest } from './rpc-
|
1
|
+
import { O as OptionalNullable, d as Block, R as RpcBlock, D as Transaction, q as RpcTransaction, T as TransactionReceipt, s as RpcTransactionRequest, v as TransactionRequest } from './rpc-b77c5aee.js';
|
2
2
|
import { Chain, Formatter, Formatters } from './chains.js';
|
3
3
|
|
4
4
|
type ExtractFormatter<TChain extends Chain, TKey extends keyof NonNullable<TChain['formatters']>, TFallbackFormatter extends Formatter = Formatter> = NonNullable<TChain['formatters']>[TKey] extends NonNullable<unknown> ? NonNullable<TChain['formatters']>[TKey] : TFallbackFormatter;
|
package/dist/utils/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
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 decodeFunctionData, m as decodeFunctionResult, n as decodeHex, o as decodeRlp, p as encodeAbi, q as encodeBytes, r as
|
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-
|
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 decodeFunctionData, m as decodeFunctionResult, n as decodeHex, o as decodeRlp, p as encodeAbi, q as encodeBytes, r as encodeDeployData, s as encodeFunctionData, t as encodeFunctionResult, u as encodeHex, v as encodeRlp, C as formatEther, V as formatGwei, W as formatUnit, w as getAddress, x as getContractAddress, z as getCreate2Address, y as getCreateAddress, A as getEventSignature, B as getFunctionSignature, J as hexToBigInt, K as hexToBool, L as hexToBytes, X as hexToNumber, M as hexToString, D as isAddress, F as isAddressEqual, H as isBytes, I as isHex, N as keccak256, O as numberToBytes, Y as numberToHex, P as pad, Q as padBytes, R as padHex, S as parseEther, T as parseGwei, U as parseUnit, Z as size, _ as slice, $ as sliceBytes, a0 as sliceHex, a1 as stringToBytes, a2 as stringToHex, a3 as trim } from '../parseGwei-0c9cad8a.js';
|
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';
|
5
|
-
import '../rpc-
|
5
|
+
import '../rpc-b77c5aee.js';
|
6
6
|
import '../chains.js';
|
7
7
|
import '@wagmi/chains';
|
8
8
|
|
package/dist/utils/index.js
CHANGED
@@ -14,7 +14,9 @@ import {
|
|
14
14
|
decodeRlp,
|
15
15
|
encodeAbi,
|
16
16
|
encodeBytes,
|
17
|
+
encodeDeployData,
|
17
18
|
encodeFunctionData,
|
19
|
+
encodeFunctionResult,
|
18
20
|
encodeHex,
|
19
21
|
encodeRlp,
|
20
22
|
extractFunctionName,
|
@@ -58,11 +60,11 @@ import {
|
|
58
60
|
stringToBytes,
|
59
61
|
stringToHex,
|
60
62
|
trim
|
61
|
-
} from "../chunk-
|
63
|
+
} from "../chunk-JND4MCSB.js";
|
62
64
|
import {
|
63
65
|
buildRequest,
|
64
66
|
rpc
|
65
|
-
} from "../chunk-
|
67
|
+
} from "../chunk-LZSCKQVJ.js";
|
66
68
|
export {
|
67
69
|
boolToBytes,
|
68
70
|
boolToHex,
|
@@ -80,7 +82,9 @@ export {
|
|
80
82
|
decodeRlp,
|
81
83
|
encodeAbi,
|
82
84
|
encodeBytes,
|
85
|
+
encodeDeployData,
|
83
86
|
encodeFunctionData,
|
87
|
+
encodeFunctionResult,
|
84
88
|
encodeHex,
|
85
89
|
encodeRlp,
|
86
90
|
extractFunctionName,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Chain, Formatter } from './chains.js';
|
2
|
-
import {
|
3
|
-
import { P as PublicClient, T as TestClient, W as WalletClient } from './createWalletClient-
|
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-
|
5
|
-
import { W as WalletPermission, a as WatchAssetParams } from './eip1193-
|
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';
|
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';
|
6
6
|
|
7
7
|
type FilterType = 'transaction' | 'block' | 'event';
|
8
8
|
type Filter<TFilterType extends FilterType = 'event'> = {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { e as TransportConfig, d as Transport, B as BaseRpcRequests } from './createWalletClient-
|
2
|
-
import {
|
1
|
+
import { e as TransportConfig, d as Transport, B as BaseRpcRequests } from './createWalletClient-b5c3c89e.js';
|
2
|
+
import { a as Hash } from './rpc-b77c5aee.js';
|
3
3
|
import { R as RpcResponse } from './rpc-26932bae.js';
|
4
4
|
|
5
5
|
type EthereumProvider = {
|
package/dist/window.d.ts
CHANGED