viem 0.0.1-alpha.5 → 0.0.1-alpha.7
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-CI2RMCPH.js → chunk-26LBGCAV.js} +1 -1
- package/dist/{chunk-J7TAHE5G.js → chunk-3N57H2YM.js} +47 -1
- package/dist/{chunk-L4ZEGSSO.js → chunk-6NVPLWQM.js} +2 -2
- package/dist/{chunk-LM2GVIJG.js → chunk-TKAGJYBH.js} +42 -1
- 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-f454ca76.d.ts → parseGwei-9cc6638c.d.ts} +33 -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-6NVPLWQM.js";
|
62
|
+
import "../chunk-TKAGJYBH.js";
|
63
|
+
import "../chunk-3N57H2YM.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
@@ -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.7",
|
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(
|
@@ -199,6 +227,21 @@ var AbiEncodingLengthMismatchError = class extends BaseError {
|
|
199
227
|
__publicField(this, "name", "AbiEncodingLengthMismatchError");
|
200
228
|
}
|
201
229
|
};
|
230
|
+
var AbiErrorSignatureNotFoundError = class extends BaseError {
|
231
|
+
constructor(signature) {
|
232
|
+
super(
|
233
|
+
[
|
234
|
+
`Encoded error signature "${signature}" not found on ABI.`,
|
235
|
+
"Make sure you are using the correct ABI and that the error exists on it.",
|
236
|
+
`You can look up the signature "${signature}" here: https://sig.eth.samczsun.com/.`
|
237
|
+
].join("\n"),
|
238
|
+
{
|
239
|
+
docsPath: "/docs/contract/decodeErrorResult"
|
240
|
+
}
|
241
|
+
);
|
242
|
+
__publicField(this, "name", "AbiErrorSignatureNotFoundError");
|
243
|
+
}
|
244
|
+
};
|
202
245
|
var AbiFunctionNotFoundError = class extends BaseError {
|
203
246
|
constructor(functionName) {
|
204
247
|
super(
|
@@ -960,9 +1003,12 @@ var rpc = {
|
|
960
1003
|
|
961
1004
|
export {
|
962
1005
|
BaseError,
|
1006
|
+
AbiConstructorNotFoundError,
|
1007
|
+
AbiConstructorParamsNotFoundError,
|
963
1008
|
AbiDecodingDataSizeInvalidError,
|
964
1009
|
AbiEncodingArrayLengthMismatchError,
|
965
1010
|
AbiEncodingLengthMismatchError,
|
1011
|
+
AbiErrorSignatureNotFoundError,
|
966
1012
|
AbiFunctionNotFoundError,
|
967
1013
|
AbiFunctionOutputsNotFoundError,
|
968
1014
|
AbiFunctionSignatureNotFoundError,
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
getAddress,
|
12
12
|
hexToNumber,
|
13
13
|
numberToHex
|
14
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-TKAGJYBH.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-3N57H2YM.js";
|
26
26
|
|
27
27
|
// src/actions/public/call.ts
|
28
28
|
async function call(client, {
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import {
|
2
|
+
AbiConstructorNotFoundError,
|
3
|
+
AbiConstructorParamsNotFoundError,
|
2
4
|
AbiDecodingDataSizeInvalidError,
|
3
5
|
AbiEncodingArrayLengthMismatchError,
|
4
6
|
AbiEncodingLengthMismatchError,
|
7
|
+
AbiErrorSignatureNotFoundError,
|
5
8
|
AbiFunctionNotFoundError,
|
6
9
|
AbiFunctionOutputsNotFoundError,
|
7
10
|
AbiFunctionSignatureNotFoundError,
|
@@ -17,7 +20,7 @@ import {
|
|
17
20
|
InvalidHexValueError,
|
18
21
|
OffsetOutOfBoundsError,
|
19
22
|
SizeExceedsPaddingSizeError
|
20
|
-
} from "./chunk-
|
23
|
+
} from "./chunk-3N57H2YM.js";
|
21
24
|
|
22
25
|
// src/utils/data/concat.ts
|
23
26
|
function concat(values) {
|
@@ -930,6 +933,20 @@ function getParam(param) {
|
|
930
933
|
return param.type;
|
931
934
|
}
|
932
935
|
|
936
|
+
// src/utils/abi/decodeErrorResult.ts
|
937
|
+
function decodeErrorResult({ abi, data }) {
|
938
|
+
const signature = slice(data, 0, 4);
|
939
|
+
const description = abi.find(
|
940
|
+
(x) => signature === getFunctionSignature(getDefinition(x))
|
941
|
+
);
|
942
|
+
if (!description)
|
943
|
+
throw new AbiErrorSignatureNotFoundError(signature);
|
944
|
+
return {
|
945
|
+
errorName: description.name,
|
946
|
+
args: "inputs" in description && description.inputs && description.inputs.length > 0 ? decodeAbi({ data: slice(data, 4), params: description.inputs }) : void 0
|
947
|
+
};
|
948
|
+
}
|
949
|
+
|
933
950
|
// src/utils/abi/decodeFunctionData.ts
|
934
951
|
function decodeFunctionData({ abi, data }) {
|
935
952
|
const signature = slice(data, 0, 4);
|
@@ -959,6 +976,28 @@ function decodeFunctionResult({
|
|
959
976
|
return values.length > 1 ? values : values.length === 1 ? values[0] : void 0;
|
960
977
|
}
|
961
978
|
|
979
|
+
// src/utils/abi/encodeDeployData.ts
|
980
|
+
function encodeDeployData({
|
981
|
+
abi,
|
982
|
+
args,
|
983
|
+
bytecode
|
984
|
+
}) {
|
985
|
+
if (!args || args.length === 0)
|
986
|
+
return bytecode;
|
987
|
+
const description = abi.find((x) => "type" in x && x.type === "constructor");
|
988
|
+
if (!description)
|
989
|
+
throw new AbiConstructorNotFoundError();
|
990
|
+
if (!("inputs" in description))
|
991
|
+
throw new AbiConstructorParamsNotFoundError();
|
992
|
+
if (!description.inputs || description.inputs.length === 0)
|
993
|
+
throw new AbiConstructorParamsNotFoundError();
|
994
|
+
const data = encodeAbi({
|
995
|
+
params: description.inputs,
|
996
|
+
values: args
|
997
|
+
});
|
998
|
+
return concatHex([bytecode, data]);
|
999
|
+
}
|
1000
|
+
|
962
1001
|
// src/utils/abi/encodeFunctionData.ts
|
963
1002
|
function encodeFunctionData({
|
964
1003
|
abi,
|
@@ -1228,8 +1267,10 @@ export {
|
|
1228
1267
|
isAddressEqual,
|
1229
1268
|
encodeAbi,
|
1230
1269
|
decodeAbi,
|
1270
|
+
decodeErrorResult,
|
1231
1271
|
decodeFunctionData,
|
1232
1272
|
decodeFunctionResult,
|
1273
|
+
encodeDeployData,
|
1233
1274
|
encodeFunctionData,
|
1234
1275
|
encodeFunctionResult,
|
1235
1276
|
etherUnits,
|
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
|
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 decodeErrorResult, m as decodeFunctionData, n as decodeFunctionResult, o as decodeHex, p as decodeRlp, q as encodeAbi, r as encodeBytes, s as encodeDeployData, t as encodeFunctionData, u as encodeFunctionResult, v as encodeHex, w as encodeRlp, D as formatEther, W as formatGwei, X as formatUnit, x as getAddress, y as getContractAddress, A as getCreate2Address, z as getCreateAddress, B as getEventSignature, C as getFunctionSignature, K as hexToBigInt, L as hexToBool, M as hexToBytes, Y as hexToNumber, N as hexToString, F as isAddress, H as isAddressEqual, I as isBytes, J as isHex, O as keccak256, P as numberToBytes, Z as numberToHex, Q as pad, R as padBytes, S as padHex, T as parseEther, U as parseGwei, V as parseUnit, _ as size, $ as slice, a0 as sliceBytes, a1 as sliceHex, a2 as stringToBytes, a3 as stringToHex, a4 as trim } from './parseGwei-9cc6638c.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-6NVPLWQM.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-26LBGCAV.js";
|
72
72
|
import {
|
73
73
|
boolToBytes,
|
74
74
|
boolToHex,
|
@@ -79,12 +79,14 @@ import {
|
|
79
79
|
bytesToString,
|
80
80
|
decodeAbi,
|
81
81
|
decodeBytes,
|
82
|
+
decodeErrorResult,
|
82
83
|
decodeFunctionData,
|
83
84
|
decodeFunctionResult,
|
84
85
|
decodeHex,
|
85
86
|
decodeRlp,
|
86
87
|
encodeAbi,
|
87
88
|
encodeBytes,
|
89
|
+
encodeDeployData,
|
88
90
|
encodeFunctionData,
|
89
91
|
encodeFunctionResult,
|
90
92
|
encodeHex,
|
@@ -130,12 +132,16 @@ import {
|
|
130
132
|
transactionType,
|
131
133
|
trim,
|
132
134
|
weiUnits
|
133
|
-
} from "./chunk-
|
135
|
+
} from "./chunk-TKAGJYBH.js";
|
134
136
|
import {
|
137
|
+
AbiConstructorNotFoundError,
|
138
|
+
AbiConstructorParamsNotFoundError,
|
135
139
|
AbiDecodingDataSizeInvalidError,
|
136
140
|
AbiEncodingArrayLengthMismatchError,
|
137
141
|
AbiEncodingLengthMismatchError,
|
138
142
|
AbiFunctionNotFoundError,
|
143
|
+
AbiFunctionOutputsNotFoundError,
|
144
|
+
AbiFunctionSignatureNotFoundError,
|
139
145
|
BaseError,
|
140
146
|
BlockNotFoundError,
|
141
147
|
DataLengthTooLongError,
|
@@ -174,12 +180,16 @@ import {
|
|
174
180
|
UrlRequiredError,
|
175
181
|
WaitForTransactionReceiptTimeoutError,
|
176
182
|
WebSocketRequestError
|
177
|
-
} from "./chunk-
|
183
|
+
} from "./chunk-3N57H2YM.js";
|
178
184
|
export {
|
185
|
+
AbiConstructorNotFoundError,
|
186
|
+
AbiConstructorParamsNotFoundError,
|
179
187
|
AbiDecodingDataSizeInvalidError,
|
180
188
|
AbiEncodingArrayLengthMismatchError,
|
181
189
|
AbiEncodingLengthMismatchError,
|
182
190
|
AbiFunctionNotFoundError,
|
191
|
+
AbiFunctionOutputsNotFoundError,
|
192
|
+
AbiFunctionSignatureNotFoundError,
|
183
193
|
BaseError,
|
184
194
|
BlockNotFoundError,
|
185
195
|
DataLengthTooLongError,
|
@@ -237,6 +247,7 @@ export {
|
|
237
247
|
custom,
|
238
248
|
decodeAbi,
|
239
249
|
decodeBytes,
|
250
|
+
decodeErrorResult,
|
240
251
|
decodeFunctionData,
|
241
252
|
decodeFunctionResult,
|
242
253
|
decodeHex,
|
@@ -244,6 +255,7 @@ export {
|
|
244
255
|
dropTransaction,
|
245
256
|
encodeAbi,
|
246
257
|
encodeBytes,
|
258
|
+
encodeDeployData,
|
247
259
|
encodeFunctionData,
|
248
260
|
encodeFunctionResult,
|
249
261
|
encodeHex,
|
@@ -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,24 @@ 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
|
+
};
|
20
38
|
type ExtractResultFromAbi<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TAbiFunction extends AbiFunction & {
|
21
39
|
type: 'function';
|
22
40
|
} = TAbi extends Abi ? ExtractAbiFunction<TAbi, TFunctionName> : AbiFunction & {
|
@@ -39,6 +57,14 @@ declare function decodeAbi<TParams extends readonly AbiParameter[]>({ data, para
|
|
39
57
|
params: TParams;
|
40
58
|
}): AbiParametersToPrimitiveTypes<TParams>;
|
41
59
|
|
60
|
+
declare function decodeErrorResult({ abi, data }: {
|
61
|
+
abi: Abi;
|
62
|
+
data: Hex;
|
63
|
+
}): {
|
64
|
+
errorName: string;
|
65
|
+
args: readonly unknown[] | undefined;
|
66
|
+
};
|
67
|
+
|
42
68
|
declare function decodeFunctionData({ abi, data }: {
|
43
69
|
abi: Abi;
|
44
70
|
data: Hex;
|
@@ -61,6 +87,11 @@ declare function encodeAbi<TParams extends readonly AbiParameter[]>({ params, va
|
|
61
87
|
values: AbiParametersToPrimitiveTypes<TParams>;
|
62
88
|
}): `0x${string}` | undefined;
|
63
89
|
|
90
|
+
declare function encodeDeployData<TAbi extends Abi = Abi>({ abi, args, bytecode, }: {
|
91
|
+
abi: TAbi;
|
92
|
+
bytecode: Hex;
|
93
|
+
} & ExtractConstructorArgsFromAbi<TAbi>): `0x${string}`;
|
94
|
+
|
64
95
|
declare function encodeFunctionData<TAbi extends Abi = Abi, TFunctionName extends ExtractAbiFunctionNames<TAbi> = any>({ abi, args, functionName, }: {
|
65
96
|
abi: TAbi;
|
66
97
|
functionName: TFunctionName;
|
@@ -272,4 +303,4 @@ declare function parseEther(ether: `${number}`, unit?: 'wei' | 'gwei'): bigint;
|
|
272
303
|
|
273
304
|
declare function parseGwei(ether: `${number}`, unit?: 'wei'): bigint;
|
274
305
|
|
275
|
-
export {
|
306
|
+
export { slice as $, getCreate2Address as A, getEventSignature as B, getFunctionSignature as C, formatEther as D, EncodeRlpResponse as E, isAddress as F, GetContractAddressOptions as G, isAddressEqual as H, isBytes as I, isHex as J, hexToBigInt as K, hexToBool as L, hexToBytes as M, hexToString as N, keccak256 as O, numberToBytes as P, pad as Q, padBytes as R, padHex as S, parseEther as T, parseGwei as U, parseUnit as V, formatGwei as W, formatUnit as X, hexToNumber as Y, numberToHex as Z, size as _, GetCreateAddressOptions as a, sliceBytes as a0, sliceHex as a1, stringToBytes as a2, stringToHex as a3, trim as a4, 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, decodeErrorResult as l, decodeFunctionData as m, decodeFunctionResult as n, decodeHex as o, decodeRlp as p, encodeAbi as q, encodeBytes as r, encodeDeployData as s, encodeFunctionData as t, encodeFunctionResult as u, encodeHex as v, encodeRlp as w, getAddress as x, getContractAddress as y, getCreateAddress 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
|
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 decodeErrorResult, m as decodeFunctionData, n as decodeFunctionResult, o as decodeHex, p as decodeRlp, q as encodeAbi, r as encodeBytes, s as encodeDeployData, t as encodeFunctionData, u as encodeFunctionResult, v as encodeHex, w as encodeRlp, D as formatEther, W as formatGwei, X as formatUnit, x as getAddress, y as getContractAddress, A as getCreate2Address, z as getCreateAddress, B as getEventSignature, C as getFunctionSignature, K as hexToBigInt, L as hexToBool, M as hexToBytes, Y as hexToNumber, N as hexToString, F as isAddress, H as isAddressEqual, I as isBytes, J as isHex, O as keccak256, P as numberToBytes, Z as numberToHex, Q as pad, R as padBytes, S as padHex, T as parseEther, U as parseGwei, V as parseUnit, _ as size, $ as slice, a0 as sliceBytes, a1 as sliceHex, a2 as stringToBytes, a3 as stringToHex, a4 as trim } from '../parseGwei-9cc6638c.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
@@ -8,12 +8,14 @@ import {
|
|
8
8
|
bytesToString,
|
9
9
|
decodeAbi,
|
10
10
|
decodeBytes,
|
11
|
+
decodeErrorResult,
|
11
12
|
decodeFunctionData,
|
12
13
|
decodeFunctionResult,
|
13
14
|
decodeHex,
|
14
15
|
decodeRlp,
|
15
16
|
encodeAbi,
|
16
17
|
encodeBytes,
|
18
|
+
encodeDeployData,
|
17
19
|
encodeFunctionData,
|
18
20
|
encodeFunctionResult,
|
19
21
|
encodeHex,
|
@@ -59,11 +61,11 @@ import {
|
|
59
61
|
stringToBytes,
|
60
62
|
stringToHex,
|
61
63
|
trim
|
62
|
-
} from "../chunk-
|
64
|
+
} from "../chunk-TKAGJYBH.js";
|
63
65
|
import {
|
64
66
|
buildRequest,
|
65
67
|
rpc
|
66
|
-
} from "../chunk-
|
68
|
+
} from "../chunk-3N57H2YM.js";
|
67
69
|
export {
|
68
70
|
boolToBytes,
|
69
71
|
boolToHex,
|
@@ -75,12 +77,14 @@ export {
|
|
75
77
|
bytesToString,
|
76
78
|
decodeAbi,
|
77
79
|
decodeBytes,
|
80
|
+
decodeErrorResult,
|
78
81
|
decodeFunctionData,
|
79
82
|
decodeFunctionResult,
|
80
83
|
decodeHex,
|
81
84
|
decodeRlp,
|
82
85
|
encodeAbi,
|
83
86
|
encodeBytes,
|
87
|
+
encodeDeployData,
|
84
88
|
encodeFunctionData,
|
85
89
|
encodeFunctionResult,
|
86
90
|
encodeHex,
|
@@ -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