viem 2.37.2 → 2.37.4-canary-20250907074101
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/CHANGELOG.md +18 -0
- package/_cjs/actions/public/watchBlockNumber.js +3 -2
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -1
- package/_cjs/chains/definitions/creditCoin3Devnet.js +24 -0
- package/_cjs/chains/definitions/creditCoin3Devnet.js.map +1 -0
- package/_cjs/chains/definitions/plasma.js +25 -0
- package/_cjs/chains/definitions/plasma.js.map +1 -0
- package/_cjs/chains/definitions/teaSepolia.js +22 -0
- package/_cjs/chains/definitions/teaSepolia.js.map +1 -0
- package/_cjs/chains/index.js +17 -11
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/clients/decorators/public.js +2 -0
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/errors/version.js.map +1 -1
- package/_esm/actions/public/watchBlockNumber.js +3 -2
- package/_esm/actions/public/watchBlockNumber.js.map +1 -1
- package/_esm/chains/definitions/creditCoin3Devnet.js +21 -0
- package/_esm/chains/definitions/creditCoin3Devnet.js.map +1 -0
- package/_esm/chains/definitions/plasma.js +22 -0
- package/_esm/chains/definitions/plasma.js.map +1 -0
- package/_esm/chains/definitions/teaSepolia.js +19 -0
- package/_esm/chains/definitions/teaSepolia.js.map +1 -0
- package/_esm/chains/index.js +3 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/clients/decorators/public.js +2 -0
- package/_esm/clients/decorators/public.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/errors/version.js.map +1 -1
- package/_types/actions/public/watchBlockNumber.d.ts.map +1 -1
- package/_types/chains/definitions/creditCoin3Devnet.d.ts +41 -0
- package/_types/chains/definitions/creditCoin3Devnet.d.ts.map +1 -0
- package/_types/chains/definitions/plasma.d.ts +39 -0
- package/_types/chains/definitions/plasma.d.ts.map +1 -0
- package/_types/chains/definitions/teaSepolia.d.ts +39 -0
- package/_types/chains/definitions/teaSepolia.d.ts.map +1 -0
- package/_types/chains/index.d.ts +3 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/clients/decorators/public.d.ts +10 -0
- package/_types/clients/decorators/public.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/errors/version.d.ts.map +1 -1
- package/actions/public/watchBlockNumber.ts +5 -2
- package/chains/definitions/creditCoin3Devnet.ts +21 -0
- package/chains/definitions/plasma.ts +22 -0
- package/chains/definitions/teaSepolia.ts +19 -0
- package/chains/index.ts +3 -0
- package/clients/decorators/public.ts +15 -0
- package/errors/version.ts +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../errors/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../errors/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,iCAAiC,CAAA"}
|
@@ -128,7 +128,7 @@ export function watchBlockNumber<
|
|
128
128
|
'getBlockNumber',
|
129
129
|
)({ cacheTime: 0 })
|
130
130
|
|
131
|
-
if (prevBlockNumber) {
|
131
|
+
if (prevBlockNumber !== undefined) {
|
132
132
|
// If the current block number is the same as the previous,
|
133
133
|
// we can skip.
|
134
134
|
if (blockNumber === prevBlockNumber) return
|
@@ -145,7 +145,10 @@ export function watchBlockNumber<
|
|
145
145
|
|
146
146
|
// If the next block number is greater than the previous,
|
147
147
|
// it is not in the past, and we can emit the new block number.
|
148
|
-
if (
|
148
|
+
if (
|
149
|
+
prevBlockNumber === undefined ||
|
150
|
+
blockNumber > prevBlockNumber
|
151
|
+
) {
|
149
152
|
emit.onBlockNumber(blockNumber, prevBlockNumber)
|
150
153
|
prevBlockNumber = blockNumber
|
151
154
|
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const creditCoin3Devnet = /*#__PURE__*/ defineChain({
|
4
|
+
id: 102032,
|
5
|
+
name: 'Creditcoin Devnet',
|
6
|
+
nativeCurrency: { name: 'Devnet CTC', symbol: 'devCTC', decimals: 18 },
|
7
|
+
rpcUrls: {
|
8
|
+
default: {
|
9
|
+
http: ['https://rpc.cc3-devnet.creditcoin.network'],
|
10
|
+
webSocket: ['wss://rpc.cc3-devnet.creditcoin.network/ws'],
|
11
|
+
},
|
12
|
+
},
|
13
|
+
blockExplorers: {
|
14
|
+
default: {
|
15
|
+
name: 'Blockscout',
|
16
|
+
url: 'https://creditcoin-devnet.blockscout.com',
|
17
|
+
apiUrl: 'https://creditcoin3-dev.subscan.io',
|
18
|
+
},
|
19
|
+
},
|
20
|
+
testnet: true,
|
21
|
+
})
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const plasma = /*#__PURE__*/ defineChain({
|
4
|
+
id: 9745,
|
5
|
+
name: 'Plasma',
|
6
|
+
nativeCurrency: {
|
7
|
+
name: 'Plasma',
|
8
|
+
symbol: 'XPL',
|
9
|
+
decimals: 18,
|
10
|
+
},
|
11
|
+
rpcUrls: {
|
12
|
+
default: {
|
13
|
+
http: ['https://rpc.plasma.to'],
|
14
|
+
},
|
15
|
+
},
|
16
|
+
blockExplorers: {
|
17
|
+
default: {
|
18
|
+
name: 'PlasmaScan',
|
19
|
+
url: 'https://plasmascan.to',
|
20
|
+
},
|
21
|
+
},
|
22
|
+
})
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const teaSepolia = /*#__PURE__*/ defineChain({
|
4
|
+
id: 10_218,
|
5
|
+
name: 'Tea Sepolia',
|
6
|
+
nativeCurrency: { name: 'Sepolia Tea', symbol: 'TEA', decimals: 18 },
|
7
|
+
rpcUrls: {
|
8
|
+
default: {
|
9
|
+
http: ['https://tea-sepolia.g.alchemy.com/public'],
|
10
|
+
},
|
11
|
+
},
|
12
|
+
blockExplorers: {
|
13
|
+
default: {
|
14
|
+
name: 'Tea Sepolia Explorer',
|
15
|
+
url: 'https://sepolia.tea.xyz',
|
16
|
+
},
|
17
|
+
},
|
18
|
+
testnet: true,
|
19
|
+
})
|
package/chains/index.ts
CHANGED
@@ -112,6 +112,7 @@ export { corn } from './definitions/corn.js'
|
|
112
112
|
export { cornTestnet } from './definitions/cornTestnet.js'
|
113
113
|
export { crab } from './definitions/crab.js'
|
114
114
|
export { creatorTestnet } from './definitions/creatorTestnet.js'
|
115
|
+
export { creditCoin3Devnet } from './definitions/creditCoin3Devnet.js'
|
115
116
|
export { creditCoin3Mainnet } from './definitions/creditCoin3Mainnet.js'
|
116
117
|
export { creditCoin3Testnet } from './definitions/creditCoin3Testnet.js'
|
117
118
|
export { cronos } from './definitions/cronos.js'
|
@@ -412,6 +413,7 @@ export { pgn } from './definitions/pgn.js'
|
|
412
413
|
export { pgnTestnet } from './definitions/pgnTestnet.js'
|
413
414
|
export { phoenix } from './definitions/phoenix.js'
|
414
415
|
export { planq } from './definitions/planq.js'
|
416
|
+
export { plasma } from './definitions/plasma.js'
|
415
417
|
export { plasmaTestnet } from './definitions/plasmaTestnet.js'
|
416
418
|
export { playfiAlbireo } from './definitions/playfiAlbireo.js'
|
417
419
|
export { plinga } from './definitions/plinga.js'
|
@@ -554,6 +556,7 @@ export { taikoKatla } from './definitions/taikoKatla.js'
|
|
554
556
|
export { taikoTestnetSepolia } from './definitions/taikoTestnetSepolia.js'
|
555
557
|
export { taraxa } from './definitions/taraxa.js'
|
556
558
|
export { taraxaTestnet } from './definitions/taraxaTestnet.js'
|
559
|
+
export { teaSepolia } from './definitions/teaSepolia.js'
|
557
560
|
export { telcoinTestnet } from './definitions/telcoinTestnet.js'
|
558
561
|
export { telos } from './definitions/telos.js'
|
559
562
|
export { telosTestnet } from './definitions/telosTestnet.js'
|
@@ -200,6 +200,11 @@ import {
|
|
200
200
|
type UninstallFilterReturnType,
|
201
201
|
uninstallFilter,
|
202
202
|
} from '../../actions/public/uninstallFilter.js'
|
203
|
+
import {
|
204
|
+
type VerifyHashParameters,
|
205
|
+
type VerifyHashReturnType,
|
206
|
+
verifyHash,
|
207
|
+
} from '../../actions/public/verifyHash.js'
|
203
208
|
import {
|
204
209
|
type VerifyMessageParameters,
|
205
210
|
type VerifyMessageReturnType,
|
@@ -1676,6 +1681,15 @@ export type PublicActions<
|
|
1676
1681
|
accountOverride
|
1677
1682
|
>
|
1678
1683
|
>
|
1684
|
+
/**
|
1685
|
+
* Verify that a hash was signed by the provided address.
|
1686
|
+
*
|
1687
|
+
* - Docs {@link https://viem.sh/docs/actions/public/verifyHash}
|
1688
|
+
*
|
1689
|
+
* @param parameters - {@link VerifyHashParameters}
|
1690
|
+
* @returns Whether or not the signature is valid. {@link VerifyHashReturnType}
|
1691
|
+
*/
|
1692
|
+
verifyHash: (args: VerifyHashParameters) => Promise<VerifyHashReturnType>
|
1679
1693
|
/**
|
1680
1694
|
* Verify that a message was signed by the provided address.
|
1681
1695
|
*
|
@@ -2008,6 +2022,7 @@ export function publicActions<
|
|
2008
2022
|
simulateBlocks: (args) => simulateBlocks(client, args),
|
2009
2023
|
simulateCalls: (args) => simulateCalls(client, args),
|
2010
2024
|
simulateContract: (args) => simulateContract(client, args),
|
2025
|
+
verifyHash: (args) => verifyHash(client, args),
|
2011
2026
|
verifyMessage: (args) => verifyMessage(client, args),
|
2012
2027
|
verifySiweMessage: (args) => verifySiweMessage(client, args),
|
2013
2028
|
verifyTypedData: (args) => verifyTypedData(client, args),
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.37.
|
1
|
+
export const version = '2.37.4-canary-20250907074101'
|