viem 0.1.0 → 0.1.1
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/abi.d.ts +3 -4
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/{chain-a4f98ba3.d.ts → chain-688e1663.d.ts} +1 -1
- package/dist/{chain-819c7ff7.d.ts → chain-d64be356.d.ts} +1 -1
- package/dist/chains.d.ts +3 -4
- package/dist/chains.js +46 -46
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-I7AINPMM.mjs → chunk-HDZRBHNX.mjs} +2 -2
- package/dist/{chunk-I7AINPMM.mjs.map → chunk-HDZRBHNX.mjs.map} +1 -1
- package/dist/{chunk-APZXOA44.mjs → chunk-N5WJ5FTW.mjs} +2 -2
- package/dist/{chunk-HCZO3OIX.js → chunk-NM6QXEYF.js} +21 -21
- package/dist/{chunk-QJNPIGP5.js → chunk-PZIHILNK.js} +2 -2
- package/dist/{chunk-QJNPIGP5.js.map → chunk-PZIHILNK.js.map} +1 -1
- package/dist/contract.d.ts +7 -8
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-a47ae6f5.d.ts → createClient-8575dcd6.d.ts} +2 -2
- package/dist/{createPublicClient-e2eae0fc.d.ts → createPublicClient-c13b17f9.d.ts} +3 -3
- package/dist/{eip1193-a882d1b8.d.ts → eip1193-029d52f0.d.ts} +1 -1
- package/dist/{encodeFunctionResult-9eb553ce.d.ts → encodeFunctionResult-12963e93.d.ts} +1 -1
- package/dist/{encodePacked-4c019ed8.d.ts → encodePacked-98b20b4d.d.ts} +1 -1
- package/dist/ens.d.ts +4 -5
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/{formatAbiItem-622d2303.d.ts → formatAbiItem-8ee3a7fa.d.ts} +1 -1
- package/dist/{getAbiItem-159f3263.d.ts → getAbiItem-de103f9b.d.ts} +1 -1
- package/dist/index.d.ts +13 -14
- package/dist/index.js +88 -88
- package/dist/index.mjs +2 -2
- package/dist/{parseGwei-a2d0d77a.d.ts → parseGwei-23d1c213.d.ts} +3 -3
- package/dist/public.d.ts +5 -6
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/{test-13f4413b.d.ts → test-f964519b.d.ts} +3 -3
- package/dist/test.d.ts +5 -6
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.d.ts +13 -14
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +4 -5
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +2 -3
- package/package.json +1 -1
- /package/dist/{chunk-APZXOA44.mjs.map → chunk-N5WJ5FTW.mjs.map} +0 -0
- /package/dist/{chunk-HCZO3OIX.js.map → chunk-NM6QXEYF.js.map} +0 -0
package/dist/abi.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
export { ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
|
2
|
-
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-
|
3
|
-
import './chain-
|
4
|
-
export { e as encodePacked } from './encodePacked-
|
2
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-de103f9b.js';
|
3
|
+
import './chain-d64be356.js';
|
4
|
+
export { e as encodePacked } from './encodePacked-98b20b4d.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import 'ethers@6/types/providers';
|
package/dist/abi.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
-
var
|
10
|
+
var _chunkPZIHILNKjs = require('./chunk-PZIHILNK.js');
|
11
11
|
|
12
12
|
|
13
13
|
|
@@ -17,5 +17,5 @@ var _chunkQJNPIGP5js = require('./chunk-QJNPIGP5.js');
|
|
17
17
|
|
18
18
|
|
19
19
|
|
20
|
-
exports.decodeAbiParameters =
|
20
|
+
exports.decodeAbiParameters = _chunkPZIHILNKjs.decodeAbiParameters; exports.encodeAbiParameters = _chunkPZIHILNKjs.encodeAbiParameters; exports.encodePacked = _chunkPZIHILNKjs.encodePacked; exports.getAbiItem = _chunkPZIHILNKjs.getAbiItem; exports.parseAbi = _chunkPZIHILNKjs.parseAbi; exports.parseAbiItem = _chunkPZIHILNKjs.parseAbiItem; exports.parseAbiParameter = _chunkPZIHILNKjs.parseAbiParameter; exports.parseAbiParameters = _chunkPZIHILNKjs.parseAbiParameters;
|
21
21
|
//# sourceMappingURL=abi.js.map
|
package/dist/abi.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Q as Formatters, C as Chain } from './chain-
|
1
|
+
import { Q as Formatters, C as Chain } from './chain-d64be356.js';
|
2
2
|
|
3
3
|
declare function defineChain<TFormatters extends Formatters = Formatters, TChain extends Chain<TFormatters> = Chain<TFormatters>>(chain: TChain): TChain;
|
4
4
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Chain as Chain$1 } from '@wagmi/chains';
|
2
2
|
import { Address, Abi, AbiFunction, ExtractAbiFunction, AbiParametersToPrimitiveTypes, AbiError, ExtractAbiError, AbiEvent, ExtractAbiEvent, ExtractAbiErrorNames, ExtractAbiEventNames, AbiStateMutability, ExtractAbiFunctionNames, Narrow, AbiParameter, AbiParameterToPrimitiveType } from 'abitype';
|
3
|
-
import { TopicFilter } from 'ethers@6/types/providers';
|
4
3
|
|
5
4
|
type ByteArray = Uint8Array;
|
6
5
|
type Hex = `0x${string}`;
|
@@ -380,6 +379,7 @@ type GetValue<TAbi extends Abi | readonly unknown[], TFunctionName extends strin
|
|
380
379
|
type: 'function';
|
381
380
|
}> = TAbiFunction['stateMutability'] extends 'payable' ? TValueType : TAbiFunction['payable'] extends true ? TValueType : never;
|
382
381
|
|
382
|
+
type TopicFilter = (null | string | string[])[];
|
383
383
|
type DecodedAbiEvent<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = TAbiEvent extends AbiEvent ? TAbiEvent['name'] : undefined> = TAbi extends Abi ? TEventName extends string ? {
|
384
384
|
args: ExtractEventArgsFromAbi<TAbi, TEventName, {
|
385
385
|
enableUnion: false;
|
package/dist/chains.d.ts
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
import { R as RpcBlock, c as Block, y as Transaction, H as Hex, p as RpcTransaction, q as RpcTransactionReceipt, T as TransactionReceipt, V as TransactionType, t as TransactionRequest, r as RpcTransactionRequest } from './chain-
|
2
|
-
export { C as Chain } from './chain-
|
3
|
-
export { d as defineChain } from './chain-
|
1
|
+
import { R as RpcBlock, c as Block, y as Transaction, H as Hex, p as RpcTransaction, q as RpcTransactionReceipt, T as TransactionReceipt, V as TransactionType, t as TransactionRequest, r as RpcTransactionRequest } from './chain-d64be356.js';
|
2
|
+
export { C as Chain } from './chain-d64be356.js';
|
3
|
+
export { d as defineChain } from './chain-688e1663.js';
|
4
4
|
import '@wagmi/chains';
|
5
5
|
import 'abitype';
|
6
|
-
import 'ethers@6/types/providers';
|
7
6
|
|
8
7
|
declare const arbitrum: {
|
9
8
|
readonly id: 42161;
|
package/dist/chains.js
CHANGED
@@ -4,32 +4,32 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
var
|
7
|
+
var _chunkPZIHILNKjs = require('./chunk-PZIHILNK.js');
|
8
8
|
|
9
9
|
// src/chains.ts
|
10
10
|
var _chains = require('@wagmi/chains'); var chains = _interopRequireWildcard(_chains);
|
11
11
|
var celoFormatters = {
|
12
|
-
block:
|
12
|
+
block: _chunkPZIHILNKjs.defineBlock.call(void 0, {
|
13
13
|
exclude: ["difficulty", "gasLimit", "mixHash", "nonce", "uncles"],
|
14
14
|
format: (block) => ({
|
15
15
|
randomness: block.randomness
|
16
16
|
})
|
17
17
|
}),
|
18
|
-
transaction:
|
18
|
+
transaction: _chunkPZIHILNKjs.defineTransaction.call(void 0, {
|
19
19
|
format: (transaction) => ({
|
20
20
|
feeCurrency: transaction.feeCurrency,
|
21
21
|
gatewayFee: transaction.gatewayFee ? BigInt(transaction.gatewayFee) : null,
|
22
22
|
gatewayFeeRecipient: transaction.gatewayFeeRecipient
|
23
23
|
})
|
24
24
|
}),
|
25
|
-
transactionReceipt:
|
25
|
+
transactionReceipt: _chunkPZIHILNKjs.defineTransactionReceipt.call(void 0, {
|
26
26
|
format: (transaction) => ({
|
27
27
|
feeCurrency: transaction.feeCurrency,
|
28
28
|
gatewayFee: transaction.gatewayFee ? BigInt(transaction.gatewayFee) : null,
|
29
29
|
gatewayFeeRecipient: transaction.gatewayFeeRecipient
|
30
30
|
})
|
31
31
|
}),
|
32
|
-
transactionRequest:
|
32
|
+
transactionRequest: _chunkPZIHILNKjs.defineTransactionRequest.call(void 0, {
|
33
33
|
format: (transactionRequest) => ({
|
34
34
|
feeCurrency: transactionRequest.feeCurrency,
|
35
35
|
gatewayFee: transactionRequest.gatewayFee,
|
@@ -37,52 +37,52 @@ var celoFormatters = {
|
|
37
37
|
})
|
38
38
|
})
|
39
39
|
};
|
40
|
-
var arbitrum2 =
|
41
|
-
var arbitrumGoerli2 =
|
42
|
-
var aurora2 =
|
43
|
-
var auroraGoerli =
|
44
|
-
var avalanche2 =
|
45
|
-
var avalancheFuji2 =
|
46
|
-
var bronos2 =
|
47
|
-
var bronosTestnet2 =
|
48
|
-
var bsc2 =
|
49
|
-
var bscTestnet2 =
|
50
|
-
var canto2 =
|
51
|
-
var celo2 =
|
40
|
+
var arbitrum2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.arbitrum);
|
41
|
+
var arbitrumGoerli2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.arbitrumGoerli);
|
42
|
+
var aurora2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.aurora);
|
43
|
+
var auroraGoerli = _chunkPZIHILNKjs.defineChain.call(void 0, chains.auroraTestnet);
|
44
|
+
var avalanche2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.avalanche);
|
45
|
+
var avalancheFuji2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.avalancheFuji);
|
46
|
+
var bronos2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.bronos);
|
47
|
+
var bronosTestnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.bronosTestnet);
|
48
|
+
var bsc2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.bsc);
|
49
|
+
var bscTestnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.bscTestnet);
|
50
|
+
var canto2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.canto);
|
51
|
+
var celo2 = _chunkPZIHILNKjs.defineChain.call(void 0, {
|
52
52
|
...chains.celo,
|
53
53
|
formatters: celoFormatters
|
54
54
|
});
|
55
|
-
var celoAlfajores2 =
|
55
|
+
var celoAlfajores2 = _chunkPZIHILNKjs.defineChain.call(void 0, {
|
56
56
|
...chains.celoAlfajores,
|
57
57
|
formatters: celoFormatters
|
58
58
|
});
|
59
|
-
var crossbell2 =
|
60
|
-
var evmos2 =
|
61
|
-
var evmosTestnet2 =
|
62
|
-
var fantom2 =
|
63
|
-
var fantomTestnet2 =
|
64
|
-
var filecoin2 =
|
65
|
-
var filecoinTestnet =
|
66
|
-
var foundry2 =
|
67
|
-
var goerli2 =
|
68
|
-
var gnosis2 =
|
69
|
-
var gnosisChiado2 =
|
70
|
-
var hardhat2 =
|
71
|
-
var iotex2 =
|
72
|
-
var iotexTestnet2 =
|
73
|
-
var localhost2 =
|
74
|
-
var mainnet2 =
|
75
|
-
var metis2 =
|
76
|
-
var metisGoerli2 =
|
77
|
-
var optimism2 =
|
78
|
-
var optimismGoerli2 =
|
79
|
-
var polygon2 =
|
80
|
-
var polygonMumbai2 =
|
81
|
-
var sepolia2 =
|
82
|
-
var taraxa2 =
|
83
|
-
var taraxaTestnet2 =
|
84
|
-
var zkSync2 =
|
85
|
-
var zkSyncTestnet2 =
|
59
|
+
var crossbell2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.crossbell);
|
60
|
+
var evmos2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.evmos);
|
61
|
+
var evmosTestnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.evmosTestnet);
|
62
|
+
var fantom2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.fantom);
|
63
|
+
var fantomTestnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.fantomTestnet);
|
64
|
+
var filecoin2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.filecoin);
|
65
|
+
var filecoinTestnet = _chunkPZIHILNKjs.defineChain.call(void 0, chains.filecoinHyperspace);
|
66
|
+
var foundry2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.foundry);
|
67
|
+
var goerli2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.goerli);
|
68
|
+
var gnosis2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.gnosis);
|
69
|
+
var gnosisChiado2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.gnosisChiado);
|
70
|
+
var hardhat2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.hardhat);
|
71
|
+
var iotex2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.iotex);
|
72
|
+
var iotexTestnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.iotexTestnet);
|
73
|
+
var localhost2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.localhost);
|
74
|
+
var mainnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.mainnet);
|
75
|
+
var metis2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.metis);
|
76
|
+
var metisGoerli2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.metisGoerli);
|
77
|
+
var optimism2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.optimism);
|
78
|
+
var optimismGoerli2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.optimismGoerli);
|
79
|
+
var polygon2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.polygon);
|
80
|
+
var polygonMumbai2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.polygonMumbai);
|
81
|
+
var sepolia2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.sepolia);
|
82
|
+
var taraxa2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.taraxa);
|
83
|
+
var taraxaTestnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.taraxaTestnet);
|
84
|
+
var zkSync2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.zkSync);
|
85
|
+
var zkSyncTestnet2 = _chunkPZIHILNKjs.defineChain.call(void 0, chains.zkSyncTestnet);
|
86
86
|
|
87
87
|
|
88
88
|
|
@@ -125,5 +125,5 @@ var zkSyncTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.zkSyncTest
|
|
125
125
|
|
126
126
|
|
127
127
|
|
128
|
-
exports.arbitrum = arbitrum2; exports.arbitrumGoerli = arbitrumGoerli2; exports.aurora = aurora2; exports.auroraGoerli = auroraGoerli; exports.avalanche = avalanche2; exports.avalancheFuji = avalancheFuji2; exports.bronos = bronos2; exports.bronosTestnet = bronosTestnet2; exports.bsc = bsc2; exports.bscTestnet = bscTestnet2; exports.canto = canto2; exports.celo = celo2; exports.celoAlfajores = celoAlfajores2; exports.crossbell = crossbell2; exports.defineChain =
|
128
|
+
exports.arbitrum = arbitrum2; exports.arbitrumGoerli = arbitrumGoerli2; exports.aurora = aurora2; exports.auroraGoerli = auroraGoerli; exports.avalanche = avalanche2; exports.avalancheFuji = avalancheFuji2; exports.bronos = bronos2; exports.bronosTestnet = bronosTestnet2; exports.bsc = bsc2; exports.bscTestnet = bscTestnet2; exports.canto = canto2; exports.celo = celo2; exports.celoAlfajores = celoAlfajores2; exports.crossbell = crossbell2; exports.defineChain = _chunkPZIHILNKjs.defineChain; exports.evmos = evmos2; exports.evmosTestnet = evmosTestnet2; exports.fantom = fantom2; exports.fantomTestnet = fantomTestnet2; exports.filecoin = filecoin2; exports.filecoinTestnet = filecoinTestnet; exports.foundry = foundry2; exports.gnosis = gnosis2; exports.gnosisChiado = gnosisChiado2; exports.goerli = goerli2; exports.hardhat = hardhat2; exports.iotex = iotex2; exports.iotexTestnet = iotexTestnet2; exports.localhost = localhost2; exports.mainnet = mainnet2; exports.metis = metis2; exports.metisGoerli = metisGoerli2; exports.optimism = optimism2; exports.optimismGoerli = optimismGoerli2; exports.polygon = polygon2; exports.polygonMumbai = polygonMumbai2; exports.sepolia = sepolia2; exports.taraxa = taraxa2; exports.taraxaTestnet = taraxaTestnet2; exports.zkSync = zkSync2; exports.zkSyncTestnet = zkSyncTestnet2;
|
129
129
|
//# sourceMappingURL=chains.js.map
|
package/dist/chains.mjs
CHANGED
@@ -17,7 +17,7 @@ import {
|
|
17
17
|
var package_default = {
|
18
18
|
name: "viem",
|
19
19
|
description: "TypeScript Interface for Ethereum",
|
20
|
-
version: "0.1.
|
20
|
+
version: "0.1.1",
|
21
21
|
scripts: {
|
22
22
|
anvil: "source .env && anvil --fork-url $VITE_ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME",
|
23
23
|
bench: "vitest bench --no-threads",
|
@@ -5323,4 +5323,4 @@ export {
|
|
5323
5323
|
formatGwei,
|
5324
5324
|
parseEther
|
5325
5325
|
};
|
5326
|
-
//# sourceMappingURL=chunk-
|
5326
|
+
//# sourceMappingURL=chunk-HDZRBHNX.mjs.map
|