viem 2.29.1-canary-20250507034646 → 2.29.2
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 +17 -1
- package/_cjs/actions/public/call.js +25 -11
- package/_cjs/actions/public/call.js.map +1 -1
- package/_cjs/actions/public/createAccessList.js +1 -1
- package/_cjs/actions/public/createAccessList.js.map +1 -1
- package/_cjs/actions/public/estimateGas.js +1 -1
- package/_cjs/actions/public/estimateGas.js.map +1 -1
- package/_cjs/actions/public/getBalance.js +1 -1
- package/_cjs/actions/public/getBalance.js.map +1 -1
- package/_cjs/actions/public/getFeeHistory.js +1 -1
- package/_cjs/actions/public/getFeeHistory.js.map +1 -1
- package/_cjs/actions/public/getTransactionCount.js +7 -2
- package/_cjs/actions/public/getTransactionCount.js.map +1 -1
- package/_cjs/actions/public/simulateBlocks.js +1 -1
- package/_cjs/actions/public/simulateBlocks.js.map +1 -1
- package/_cjs/chains/definitions/flame.js +33 -0
- package/_cjs/chains/definitions/flame.js.map +1 -0
- package/_cjs/chains/definitions/worldchainSepolia.js +1 -1
- package/_cjs/chains/index.js +11 -9
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/errors/version.js.map +1 -1
- package/_cjs/experimental/erc7895/actions/addSubAccount.js.map +1 -1
- package/_cjs/linea/actions/estimateGas.js +1 -1
- package/_cjs/linea/actions/estimateGas.js.map +1 -1
- package/_cjs/utils/siwe/validateSiweMessage.js +3 -0
- package/_cjs/utils/siwe/validateSiweMessage.js.map +1 -1
- package/_esm/actions/public/call.js +25 -11
- package/_esm/actions/public/call.js.map +1 -1
- package/_esm/actions/public/createAccessList.js +1 -1
- package/_esm/actions/public/createAccessList.js.map +1 -1
- package/_esm/actions/public/estimateGas.js +1 -1
- package/_esm/actions/public/estimateGas.js.map +1 -1
- package/_esm/actions/public/getBalance.js +1 -1
- package/_esm/actions/public/getBalance.js.map +1 -1
- package/_esm/actions/public/getFeeHistory.js +1 -1
- package/_esm/actions/public/getFeeHistory.js.map +1 -1
- package/_esm/actions/public/getTransactionCount.js +7 -2
- package/_esm/actions/public/getTransactionCount.js.map +1 -1
- package/_esm/actions/public/simulateBlocks.js +1 -1
- package/_esm/actions/public/simulateBlocks.js.map +1 -1
- package/_esm/chains/definitions/flame.js +30 -0
- package/_esm/chains/definitions/flame.js.map +1 -0
- package/_esm/chains/definitions/worldchainSepolia.js +1 -1
- package/_esm/chains/index.js +1 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/errors/version.js.map +1 -1
- package/_esm/experimental/erc7895/actions/addSubAccount.js.map +1 -1
- package/_esm/linea/actions/estimateGas.js +1 -1
- package/_esm/linea/actions/estimateGas.js.map +1 -1
- package/_esm/utils/siwe/validateSiweMessage.js +3 -0
- package/_esm/utils/siwe/validateSiweMessage.js.map +1 -1
- package/_types/actions/public/call.d.ts +3 -0
- package/_types/actions/public/call.d.ts.map +1 -1
- package/_types/actions/public/createAccessList.d.ts.map +1 -1
- package/_types/actions/public/estimateGas.d.ts.map +1 -1
- package/_types/actions/public/getBalance.d.ts.map +1 -1
- package/_types/actions/public/getFeeHistory.d.ts.map +1 -1
- package/_types/actions/public/getTransactionCount.d.ts.map +1 -1
- package/_types/actions/public/simulateBlocks.d.ts.map +1 -1
- package/_types/chains/definitions/flame.d.ts +36 -0
- package/_types/chains/definitions/flame.d.ts.map +1 -0
- package/_types/chains/definitions/worldchainSepolia.d.ts +1 -1
- package/_types/chains/index.d.ts +1 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/errors/version.d.ts.map +1 -1
- package/_types/experimental/erc7895/actions/addSubAccount.d.ts +2 -2
- package/_types/experimental/erc7895/actions/addSubAccount.d.ts.map +1 -1
- package/_types/linea/actions/estimateGas.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +7 -2
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/utils/siwe/validateSiweMessage.d.ts.map +1 -1
- package/actions/public/call.ts +30 -10
- package/actions/public/createAccessList.ts +2 -1
- package/actions/public/estimateGas.ts +2 -1
- package/actions/public/getBalance.ts +2 -1
- package/actions/public/getFeeHistory.ts +2 -1
- package/actions/public/getTransactionCount.ts +7 -2
- package/actions/public/simulateBlocks.ts +2 -1
- package/chains/definitions/flame.ts +30 -0
- package/chains/definitions/worldchainSepolia.ts +1 -1
- package/chains/index.ts +1 -0
- package/errors/version.ts +1 -1
- package/experimental/erc7895/actions/addSubAccount.ts +6 -4
- package/linea/actions/estimateGas.ts +2 -1
- package/package.json +9 -1
- package/types/eip1193.ts +9 -3
- package/utils/siwe/validateSiweMessage.ts +2 -0
package/chains/index.ts
CHANGED
@@ -175,6 +175,7 @@ export { filecoin } from './definitions/filecoin.js'
|
|
175
175
|
export { filecoinCalibration } from './definitions/filecoinCalibration.js'
|
176
176
|
export { filecoinHyperspace } from './definitions/filecoinHyperspace.js'
|
177
177
|
export { fireChain } from './definitions/5ireChain.js'
|
178
|
+
export { flame } from './definitions/flame.js'
|
178
179
|
export { flare } from './definitions/flare.js'
|
179
180
|
export { flareTestnet } from './definitions/flareTestnet.js'
|
180
181
|
export { flowMainnet } from './definitions/flowMainnet.js'
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.29.
|
1
|
+
export const version = '2.29.2'
|
@@ -10,10 +10,12 @@ import { numberToHex } from '../../../utils/index.js'
|
|
10
10
|
export type AddSubAccountParameters = Prettify<
|
11
11
|
OneOf<
|
12
12
|
| {
|
13
|
-
keys
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
keys?:
|
14
|
+
| readonly {
|
15
|
+
publicKey: Hex
|
16
|
+
type: 'address' | 'p256' | 'webcrypto-p256' | 'webauthn-p256'
|
17
|
+
}[]
|
18
|
+
| undefined
|
17
19
|
type: 'create'
|
18
20
|
}
|
19
21
|
| {
|
@@ -80,7 +80,8 @@ export async function estimateGas<
|
|
80
80
|
...rest
|
81
81
|
} = args
|
82
82
|
|
83
|
-
const blockNumberHex =
|
83
|
+
const blockNumberHex =
|
84
|
+
typeof blockNumber === 'bigint' ? numberToHex(blockNumber) : undefined
|
84
85
|
const block = blockNumberHex || blockTag
|
85
86
|
|
86
87
|
assertRequest(args as AssertRequestParameters)
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "viem",
|
3
3
|
"description": "TypeScript Interface for Ethereum",
|
4
|
-
"version": "2.29.
|
4
|
+
"version": "2.29.2",
|
5
5
|
"main": "./_cjs/index.js",
|
6
6
|
"module": "./_esm/index.js",
|
7
7
|
"types": "./_types/index.d.ts",
|
@@ -79,6 +79,11 @@
|
|
79
79
|
"import": "./_esm/experimental/erc7846/index.js",
|
80
80
|
"default": "./_cjs/experimental/erc7846/index.js"
|
81
81
|
},
|
82
|
+
"./experimental/erc7895": {
|
83
|
+
"types": "./_types/experimental/erc7895/index.d.ts",
|
84
|
+
"import": "./_esm/experimental/erc7895/index.js",
|
85
|
+
"default": "./_cjs/experimental/erc7895/index.js"
|
86
|
+
},
|
82
87
|
"./linea": {
|
83
88
|
"types": "./_types/linea/index.d.ts",
|
84
89
|
"import": "./_esm/linea/index.js",
|
@@ -153,6 +158,9 @@
|
|
153
158
|
"experimental/erc7846": [
|
154
159
|
"./_types/experimental/erc7846/index.d.ts"
|
155
160
|
],
|
161
|
+
"experimental/erc7895": [
|
162
|
+
"./_types/experimental/erc7895/index.d.ts"
|
163
|
+
],
|
156
164
|
"node": [
|
157
165
|
"./_types/node/index.d.ts"
|
158
166
|
],
|
package/types/eip1193.ts
CHANGED
@@ -643,15 +643,21 @@ export type PublicRpcSchema = [
|
|
643
643
|
{
|
644
644
|
Method: 'eth_call'
|
645
645
|
Parameters:
|
646
|
-
| [transaction: ExactPartial<TransactionRequest>]
|
647
|
-
| [
|
646
|
+
| readonly [transaction: ExactPartial<TransactionRequest>]
|
647
|
+
| readonly [
|
648
648
|
transaction: ExactPartial<TransactionRequest>,
|
649
649
|
block: BlockNumber | BlockTag | BlockIdentifier,
|
650
650
|
]
|
651
|
-
| [
|
651
|
+
| readonly [
|
652
|
+
transaction: ExactPartial<TransactionRequest>,
|
653
|
+
block: BlockNumber | BlockTag | BlockIdentifier,
|
654
|
+
stateOverrideSet: RpcStateOverride,
|
655
|
+
]
|
656
|
+
| readonly [
|
652
657
|
transaction: ExactPartial<TransactionRequest>,
|
653
658
|
block: BlockNumber | BlockTag | BlockIdentifier,
|
654
659
|
stateOverrideSet: RpcStateOverride,
|
660
|
+
blockOverrides: BlockOverrides.Rpc,
|
655
661
|
]
|
656
662
|
ReturnType: Hex
|
657
663
|
},
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { Address } from 'abitype'
|
2
2
|
|
3
3
|
import type { ExactPartial } from '../../types/utils.js'
|
4
|
+
import { isAddress } from '../address/isAddress.js'
|
4
5
|
import { isAddressEqual } from '../address/isAddressEqual.js'
|
5
6
|
import type { SiweMessage } from './types.js'
|
6
7
|
|
@@ -61,6 +62,7 @@ export function validateSiweMessage(
|
|
61
62
|
|
62
63
|
try {
|
63
64
|
if (!message.address) return false
|
65
|
+
if (!isAddress(message.address, { strict: false })) return false
|
64
66
|
if (address && !isAddressEqual(message.address, address)) return false
|
65
67
|
} catch {
|
66
68
|
return false
|