viem 0.1.2 → 0.1.4

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/README.md CHANGED
@@ -1,9 +1,11 @@
1
- <p align="center">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://github.com/wagmi-dev/viem/blob/main/.github/gh-logo-dark.svg">
4
- <img alt="viem logo" src="https://github.com/wagmi-dev/viem/blob/main/.github/gh-logo-light.svg" width="auto" height="60">
5
- </picture>
6
- </p>
1
+ <a href="https://viem.sh">
2
+ <p align="center">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/wagmi-dev/viem/blob/main/.github/gh-logo-dark.svg">
5
+ <img alt="viem logo" src="https://github.com/wagmi-dev/viem/blob/main/.github/gh-logo-light.svg" width="auto" height="60">
6
+ </picture>
7
+ </p>
8
+ </a>
7
9
 
8
10
  <p align="center">
9
11
  TypeScript Interface for Ethereum
@@ -131,6 +133,12 @@ Check out the following places for more viem-related content:
131
133
  <img alt="Stripe logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/stripe-light.svg" width="auto" height="50">
132
134
  </picture>
133
135
  </a>
136
+ <a href="https://bitkeep.com">
137
+ <picture>
138
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/bitkeep-dark.svg">
139
+ <img alt="BitKeep logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/bitkeep-light.svg" width="auto" height="50">
140
+ </picture>
141
+ </a>
134
142
 
135
143
  ## Contributing
136
144
 
package/dist/abi.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkR5D7QBNZjs = require('./chunk-R5D7QBNZ.js');
10
+ var _chunkG7FFDM5Fjs = require('./chunk-G7FFDM5F.js');
11
11
 
12
12
 
13
13
 
@@ -17,5 +17,5 @@ var _chunkR5D7QBNZjs = require('./chunk-R5D7QBNZ.js');
17
17
 
18
18
 
19
19
 
20
- exports.decodeAbiParameters = _chunkR5D7QBNZjs.decodeAbiParameters; exports.encodeAbiParameters = _chunkR5D7QBNZjs.encodeAbiParameters; exports.encodePacked = _chunkR5D7QBNZjs.encodePacked; exports.getAbiItem = _chunkR5D7QBNZjs.getAbiItem; exports.parseAbi = _chunkR5D7QBNZjs.parseAbi; exports.parseAbiItem = _chunkR5D7QBNZjs.parseAbiItem; exports.parseAbiParameter = _chunkR5D7QBNZjs.parseAbiParameter; exports.parseAbiParameters = _chunkR5D7QBNZjs.parseAbiParameters;
20
+ exports.decodeAbiParameters = _chunkG7FFDM5Fjs.decodeAbiParameters; exports.encodeAbiParameters = _chunkG7FFDM5Fjs.encodeAbiParameters; exports.encodePacked = _chunkG7FFDM5Fjs.encodePacked; exports.getAbiItem = _chunkG7FFDM5Fjs.getAbiItem; exports.parseAbi = _chunkG7FFDM5Fjs.parseAbi; exports.parseAbiItem = _chunkG7FFDM5Fjs.parseAbiItem; exports.parseAbiParameter = _chunkG7FFDM5Fjs.parseAbiParameter; exports.parseAbiParameters = _chunkG7FFDM5Fjs.parseAbiParameters;
21
21
  //# sourceMappingURL=abi.js.map
package/dist/abi.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  parseAbiItem,
8
8
  parseAbiParameter,
9
9
  parseAbiParameters
10
- } from "./chunk-VUSHGUTQ.mjs";
10
+ } from "./chunk-7NY73N4K.mjs";
11
11
  export {
12
12
  decodeAbiParameters,
13
13
  encodeAbiParameters,
package/dist/chains.d.ts CHANGED
@@ -1,7 +1,7 @@
1
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
2
  export { C as Chain } from './chain-d64be356.js';
3
+ import * as chains from '@wagmi/chains';
3
4
  export { d as defineChain } from './chain-688e1663.js';
4
- import '@wagmi/chains';
5
5
  import 'abitype';
6
6
 
7
7
  declare const arbitrum: {
@@ -221,6 +221,69 @@ declare const avalancheFuji: {
221
221
  };
222
222
  readonly testnet: true;
223
223
  };
224
+ declare const baseGoerli: {
225
+ readonly id: 84531;
226
+ readonly network: "base-goerli";
227
+ readonly name: "Base Goerli";
228
+ readonly nativeCurrency: {
229
+ readonly name: "Base Goerli";
230
+ readonly symbol: "ETH";
231
+ readonly decimals: 18;
232
+ };
233
+ readonly rpcUrls: {
234
+ readonly default: {
235
+ readonly http: readonly ["https://goerli.base.org"];
236
+ };
237
+ readonly public: {
238
+ readonly http: readonly ["https://goerli.base.org"];
239
+ };
240
+ };
241
+ readonly blockExplorers: {
242
+ readonly etherscan: {
243
+ readonly name: "Basescan";
244
+ readonly url: "https://goerli.basescan.org";
245
+ };
246
+ readonly default: {
247
+ readonly name: "Basescan";
248
+ readonly url: "https://goerli.basescan.org";
249
+ };
250
+ };
251
+ readonly testnet: true;
252
+ };
253
+ declare const boba: {
254
+ readonly id: 288;
255
+ readonly name: "Boba Network";
256
+ readonly network: "boba";
257
+ readonly nativeCurrency: {
258
+ readonly decimals: 18;
259
+ readonly name: "BOBA";
260
+ readonly symbol: "ETH";
261
+ };
262
+ readonly rpcUrls: {
263
+ readonly default: {
264
+ readonly http: readonly ["https://mainnet.boba.network"];
265
+ };
266
+ readonly public: {
267
+ readonly http: readonly ["https://mainnet.boba.network"];
268
+ };
269
+ };
270
+ readonly blockExplorers: {
271
+ readonly etherscan: {
272
+ readonly name: "BOBAScan";
273
+ readonly url: "https://bobascan.com";
274
+ };
275
+ readonly default: {
276
+ readonly name: "BOBAScan";
277
+ readonly url: "https://bobascan.com";
278
+ };
279
+ };
280
+ readonly contracts: {
281
+ readonly multicall3: {
282
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
283
+ readonly blockCreated: 446859;
284
+ };
285
+ };
286
+ };
224
287
  declare const bronos: {
225
288
  readonly id: 1039;
226
289
  readonly name: "Bronos";
@@ -695,7 +758,8 @@ declare const filecoin: {
695
758
  };
696
759
  };
697
760
  };
698
- declare const filecoinTestnet: {
761
+ declare const filecoinCalibration: chains.Chain;
762
+ declare const filecoinHyperspace: {
699
763
  readonly id: 3141;
700
764
  readonly name: "Filecoin Hyperspace";
701
765
  readonly network: "filecoin-hyperspace";
@@ -723,6 +787,8 @@ declare const filecoinTestnet: {
723
787
  };
724
788
  };
725
789
  };
790
+ declare const flare: chains.Chain;
791
+ declare const flareTestnet: chains.Chain;
726
792
  declare const foundry: {
727
793
  readonly id: 31337;
728
794
  readonly name: "Foundry";
@@ -861,6 +927,36 @@ declare const hardhat: {
861
927
  };
862
928
  };
863
929
  };
930
+ declare const harmonyOne: {
931
+ readonly id: 1666600000;
932
+ readonly name: "Harmony One";
933
+ readonly network: "harmony";
934
+ readonly nativeCurrency: {
935
+ readonly name: "Harmony";
936
+ readonly symbol: "ONE";
937
+ readonly decimals: 18;
938
+ };
939
+ readonly rpcUrls: {
940
+ readonly public: {
941
+ readonly http: readonly ["https://rpc.ankr.com/harmony"];
942
+ };
943
+ readonly default: {
944
+ readonly http: readonly ["https://rpc.ankr.com/harmony"];
945
+ };
946
+ };
947
+ readonly blockExplorers: {
948
+ readonly default: {
949
+ readonly name: "Harmony Explorer";
950
+ readonly url: "https://explorer.harmony.one";
951
+ };
952
+ };
953
+ readonly contracts: {
954
+ readonly multicall3: {
955
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
956
+ readonly blockCreated: 24185753;
957
+ };
958
+ };
959
+ };
864
960
  declare const iotex: {
865
961
  readonly id: 4689;
866
962
  readonly name: "IoTeX";
@@ -1028,6 +1124,147 @@ declare const metisGoerli: {
1028
1124
  };
1029
1125
  };
1030
1126
  };
1127
+ declare const moonbaseAlpha: {
1128
+ readonly id: 1287;
1129
+ readonly name: "Moonbase Alpha";
1130
+ readonly network: "moonbase-alpha";
1131
+ readonly nativeCurrency: {
1132
+ readonly decimals: 18;
1133
+ readonly name: "DEV";
1134
+ readonly symbol: "DEV";
1135
+ };
1136
+ readonly rpcUrls: {
1137
+ readonly default: {
1138
+ readonly http: readonly ["https://rpc.api.moonbase.moonbeam.network"];
1139
+ readonly webSocket: readonly ["wss://wss.api.moonbase.moonbeam.network"];
1140
+ };
1141
+ readonly public: {
1142
+ readonly http: readonly ["https://rpc.api.moonbase.moonbeam.network"];
1143
+ readonly webSocket: readonly ["wss://wss.api.moonbase.moonbeam.network"];
1144
+ };
1145
+ };
1146
+ readonly blockExplorers: {
1147
+ readonly default: {
1148
+ readonly name: "Moonscan";
1149
+ readonly url: "https://moonbase.moonscan.io";
1150
+ };
1151
+ readonly etherscan: {
1152
+ readonly name: "Moonscan";
1153
+ readonly url: "https://moonbase.moonscan.io";
1154
+ };
1155
+ };
1156
+ readonly contracts: {
1157
+ readonly multicall3: {
1158
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
1159
+ readonly blockCreated: 1850686;
1160
+ };
1161
+ };
1162
+ readonly testnet: true;
1163
+ };
1164
+ declare const moonbeam: {
1165
+ readonly id: 1284;
1166
+ readonly name: "Moonbeam";
1167
+ readonly network: "moonbeam";
1168
+ readonly nativeCurrency: {
1169
+ readonly decimals: 18;
1170
+ readonly name: "GLMR";
1171
+ readonly symbol: "GLMR";
1172
+ };
1173
+ readonly rpcUrls: {
1174
+ readonly public: {
1175
+ readonly http: readonly ["https://moonbeam.public.blastapi.io"];
1176
+ readonly webSocket: readonly ["wss://moonbeam.public.blastapi.io"];
1177
+ };
1178
+ readonly default: {
1179
+ readonly http: readonly ["https://moonbeam.public.blastapi.io"];
1180
+ readonly webSocket: readonly ["wss://moonbeam.public.blastapi.io"];
1181
+ };
1182
+ };
1183
+ readonly blockExplorers: {
1184
+ readonly default: {
1185
+ readonly name: "Moonscan";
1186
+ readonly url: "https://moonscan.io";
1187
+ };
1188
+ readonly etherscan: {
1189
+ readonly name: "Moonscan";
1190
+ readonly url: "https://moonscan.io";
1191
+ };
1192
+ };
1193
+ readonly contracts: {
1194
+ readonly multicall3: {
1195
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
1196
+ readonly blockCreated: 609002;
1197
+ };
1198
+ };
1199
+ readonly testnet: false;
1200
+ };
1201
+ declare const moonriver: {
1202
+ readonly id: 1285;
1203
+ readonly name: "Moonriver";
1204
+ readonly network: "moonriver";
1205
+ readonly nativeCurrency: {
1206
+ readonly decimals: 18;
1207
+ readonly name: "MOVR";
1208
+ readonly symbol: "MOVR";
1209
+ };
1210
+ readonly rpcUrls: {
1211
+ readonly public: {
1212
+ readonly http: readonly ["https://moonriver.public.blastapi.io"];
1213
+ readonly webSocket: readonly ["wss://moonriver.public.blastapi.io"];
1214
+ };
1215
+ readonly default: {
1216
+ readonly http: readonly ["https://moonriver.public.blastapi.io"];
1217
+ readonly webSocket: readonly ["wss://moonriver.public.blastapi.io"];
1218
+ };
1219
+ };
1220
+ readonly blockExplorers: {
1221
+ readonly default: {
1222
+ readonly name: "Moonscan";
1223
+ readonly url: "https://moonriver.moonscan.io";
1224
+ };
1225
+ readonly etherscan: {
1226
+ readonly name: "Moonscan";
1227
+ readonly url: "https://moonriver.moonscan.io";
1228
+ };
1229
+ };
1230
+ readonly contracts: {
1231
+ readonly multicall3: {
1232
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
1233
+ readonly blockCreated: 1597904;
1234
+ };
1235
+ };
1236
+ readonly testnet: false;
1237
+ };
1238
+ declare const okc: {
1239
+ readonly id: 66;
1240
+ readonly name: "OKC";
1241
+ readonly network: "okc";
1242
+ readonly nativeCurrency: {
1243
+ readonly decimals: 18;
1244
+ readonly name: "OKT";
1245
+ readonly symbol: "OKT";
1246
+ };
1247
+ readonly rpcUrls: {
1248
+ readonly default: {
1249
+ readonly http: readonly ["https://exchainrpc.okex.org"];
1250
+ };
1251
+ readonly public: {
1252
+ readonly http: readonly ["https://exchainrpc.okex.org"];
1253
+ };
1254
+ };
1255
+ readonly blockExplorers: {
1256
+ readonly default: {
1257
+ readonly name: "oklink";
1258
+ readonly url: "https://www.oklink.com/okc";
1259
+ };
1260
+ };
1261
+ readonly contracts: {
1262
+ readonly multicall3: {
1263
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
1264
+ readonly blockCreated: 10364792;
1265
+ };
1266
+ };
1267
+ };
1031
1268
  declare const optimism: {
1032
1269
  readonly id: 10;
1033
1270
  readonly name: "Optimism";
@@ -1198,6 +1435,31 @@ declare const polygonMumbai: {
1198
1435
  };
1199
1436
  readonly testnet: true;
1200
1437
  };
1438
+ declare const polygonZkEvmTestnet: {
1439
+ readonly id: 1422;
1440
+ readonly name: "Polygon zkEVM Testnet";
1441
+ readonly network: "polygon-zkevm-testnet";
1442
+ readonly nativeCurrency: {
1443
+ readonly name: "Ether";
1444
+ readonly symbol: "ETH";
1445
+ readonly decimals: 18;
1446
+ };
1447
+ readonly rpcUrls: {
1448
+ readonly default: {
1449
+ readonly http: readonly ["https://rpc.public.zkevm-test.net"];
1450
+ };
1451
+ readonly public: {
1452
+ readonly http: readonly ["https://rpc.public.zkevm-test.net"];
1453
+ };
1454
+ };
1455
+ readonly blockExplorers: {
1456
+ readonly default: {
1457
+ readonly name: "Blockscout";
1458
+ readonly url: "https://explorer.public.zkevm-test.net";
1459
+ };
1460
+ };
1461
+ readonly testnet: true;
1462
+ };
1201
1463
  declare const sepolia: {
1202
1464
  readonly id: 11155111;
1203
1465
  readonly network: "sepolia";
@@ -1237,6 +1499,33 @@ declare const sepolia: {
1237
1499
  };
1238
1500
  readonly testnet: true;
1239
1501
  };
1502
+ declare const shardeumSphinx: {
1503
+ readonly id: 8082;
1504
+ readonly name: "Shardeum Sphinx";
1505
+ readonly network: "shmSphinx";
1506
+ readonly nativeCurrency: {
1507
+ readonly name: "SHARDEUM";
1508
+ readonly symbol: "SHM";
1509
+ readonly decimals: 18;
1510
+ };
1511
+ readonly rpcUrls: {
1512
+ readonly default: {
1513
+ readonly http: readonly ["https://sphinx.shardeum.org"];
1514
+ };
1515
+ readonly public: {
1516
+ readonly http: readonly ["https://sphinx.shardeum.org"];
1517
+ };
1518
+ };
1519
+ readonly blockExplorers: {
1520
+ readonly default: {
1521
+ readonly name: "Shardeum Explorer";
1522
+ readonly url: "https://explorer-sphinx.shardeum.org";
1523
+ };
1524
+ };
1525
+ readonly testnet: true;
1526
+ };
1527
+ declare const songbird: chains.Chain;
1528
+ declare const songbirdTestnet: chains.Chain;
1240
1529
  declare const taraxa: {
1241
1530
  readonly id: 841;
1242
1531
  readonly name: "Taraxa Mainnet";
@@ -1286,6 +1575,94 @@ declare const taraxaTestnet: {
1286
1575
  };
1287
1576
  readonly testnet: true;
1288
1577
  };
1578
+ declare const telos: {
1579
+ readonly id: 40;
1580
+ readonly name: "Telos";
1581
+ readonly network: "telos";
1582
+ readonly nativeCurrency: {
1583
+ readonly decimals: 18;
1584
+ readonly name: "Telos";
1585
+ readonly symbol: "TLOS";
1586
+ };
1587
+ readonly rpcUrls: {
1588
+ readonly default: {
1589
+ readonly http: readonly ["https://mainnet.telos.net/evm"];
1590
+ };
1591
+ readonly public: {
1592
+ readonly http: readonly ["https://mainnet.telos.net/evm"];
1593
+ };
1594
+ };
1595
+ readonly blockExplorers: {
1596
+ readonly default: {
1597
+ readonly name: "Teloscan";
1598
+ readonly url: "https://www.teloscan.io/";
1599
+ };
1600
+ };
1601
+ readonly contracts: {
1602
+ readonly multicall3: {
1603
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
1604
+ readonly blockCreated: 246530709;
1605
+ };
1606
+ };
1607
+ };
1608
+ declare const telosTestnet: {
1609
+ readonly id: 41;
1610
+ readonly name: "Telos";
1611
+ readonly network: "telosTestnet";
1612
+ readonly nativeCurrency: {
1613
+ readonly decimals: 18;
1614
+ readonly name: "Telos";
1615
+ readonly symbol: "TLOS";
1616
+ };
1617
+ readonly rpcUrls: {
1618
+ readonly default: {
1619
+ readonly http: readonly ["https://testnet.telos.net/evm"];
1620
+ };
1621
+ readonly public: {
1622
+ readonly http: readonly ["https://testnet.telos.net/evm"];
1623
+ };
1624
+ };
1625
+ readonly blockExplorers: {
1626
+ readonly default: {
1627
+ readonly name: "Teloscan (testnet)";
1628
+ readonly url: "https://testnet.teloscan.io/";
1629
+ };
1630
+ };
1631
+ readonly testnet: true;
1632
+ };
1633
+ declare const zhejiang: {
1634
+ readonly id: 1337803;
1635
+ readonly network: "zhejiang";
1636
+ readonly name: "Zhejiang";
1637
+ readonly nativeCurrency: {
1638
+ readonly name: "Zhejiang Ether";
1639
+ readonly symbol: "ZhejETH";
1640
+ readonly decimals: 18;
1641
+ };
1642
+ readonly rpcUrls: {
1643
+ readonly default: {
1644
+ readonly http: readonly ["https://rpc.zhejiang.ethpandaops.io"];
1645
+ };
1646
+ readonly public: {
1647
+ readonly http: readonly ["https://rpc.zhejiang.ethpandaops.io"];
1648
+ };
1649
+ };
1650
+ readonly blockExplorers: {
1651
+ readonly beaconchain: {
1652
+ readonly name: "Etherscan";
1653
+ readonly url: "https://zhejiang.beaconcha.in";
1654
+ };
1655
+ readonly blockscout: {
1656
+ readonly name: "Blockscout";
1657
+ readonly url: "https://blockscout.com/eth/zhejiang-testnet";
1658
+ };
1659
+ readonly default: {
1660
+ readonly name: "Beaconchain";
1661
+ readonly url: "https://zhejiang.beaconcha.in";
1662
+ };
1663
+ };
1664
+ readonly testnet: true;
1665
+ };
1289
1666
  declare const zkSync: {
1290
1667
  readonly id: 324;
1291
1668
  readonly name: "zkSync";
@@ -1340,4 +1717,4 @@ declare const zkSyncTestnet: {
1340
1717
  readonly testnet: true;
1341
1718
  };
1342
1719
 
1343
- export { arbitrum, arbitrumGoerli, aurora, auroraGoerli, avalanche, avalancheFuji, bronos, bronosTestnet, bsc, bscTestnet, canto, celo, celoAlfajores, crossbell, evmos, evmosTestnet, fantom, fantomTestnet, filecoin, filecoinTestnet, foundry, gnosis, gnosisChiado, goerli, hardhat, iotex, iotexTestnet, localhost, mainnet, metis, metisGoerli, optimism, optimismGoerli, polygon, polygonMumbai, sepolia, taraxa, taraxaTestnet, zkSync, zkSyncTestnet };
1720
+ export { arbitrum, arbitrumGoerli, aurora, auroraGoerli, avalanche, avalancheFuji, baseGoerli, boba, bronos, bronosTestnet, bsc, bscTestnet, canto, celo, celoAlfajores, crossbell, evmos, evmosTestnet, fantom, fantomTestnet, filecoin, filecoinCalibration, filecoinHyperspace, flare, flareTestnet, foundry, gnosis, gnosisChiado, goerli, hardhat, harmonyOne, iotex, iotexTestnet, localhost, mainnet, metis, metisGoerli, moonbaseAlpha, moonbeam, moonriver, okc, optimism, optimismGoerli, polygon, polygonMumbai, polygonZkEvmTestnet, sepolia, shardeumSphinx, songbird, songbirdTestnet, taraxa, taraxaTestnet, telos, telosTestnet, zhejiang, zkSync, zkSyncTestnet };