Vigia

@metamask/eth-sig-util को 9.x से 10.x पर अपग्रेड करना

@metamask/eth-sig-util 9.0.0 और 10.0.0 के सार्वजनिक API की तुलना, उनके TypeScript टाइप से अपने-आप निकाली गई। बदला हुआ सिग्नेचर संभावित असंगत बदलाव है, निश्चितता नहीं।

सारांश

हटाए गए इम्पोर्ट पाथ0
हटाए गए एक्सपोर्ट0
बदले गए सिग्नेचर14
क्लास या इंटरफ़ेस के हटाए गए सदस्य0
क्लास या इंटरफ़ेस के बदले गए सदस्य0
नए डिप्रिकेटेड0
आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)1
नए एक्सपोर्ट0

हटाए गए एक्सपोर्ट

कुछ नहीं मिला।

बदले गए सिग्नेचर

exportपहलेबाद में
@metamask/eth-sig-util · decrypt({ encryptedData, privateKey, }: { encryptedData: EthEncryptedData; privateKey: string; }): string({ encryptedData, privateKey, }: { encryptedData: EthEncryptedData; privateKey: string; }): Promise<string>
@metamask/eth-sig-util · encrypt({ publicKey, data, version, }: { publicKey: string; data: unknown; version: string; }): EthEncryptedData({ publicKey, data, version, }: { publicKey: string; data: unknown; version: string; }): Promise<EthEncryptedData>
@metamask/eth-sig-util · concatSig(v: Buffer, r: Buffer, s: Buffer): string(v: Uint8Array<ArrayBufferLike>, r: Uint8Array<ArrayBufferLike>, s: Uint8Array<ArrayBufferLike>): string
@metamask/eth-sig-util · TypedMessage{ types: T; primaryType: keyof T; domain: { name?: string | undefined; version?: string | undefined; chainId?: number | undefined; verifyingContract?: string | undefined; salt?: ArrayBuffer | undefined; }; message: Record<string, unknown>; }{ types: T; primaryType: keyof T; domain: { name?: string | undefined; version?: string | undefined; chainId?: number | undefined; verifyingContract?: string | undefined; salt?: string | Uint8Array<ArrayBufferLike> | undefined; }; message: Record<string, unknown>; }
@metamask/eth-sig-util · personalSign({ privateKey, data, }: { privateKey: Buffer; data: ToBufferInputTypes; }): string({ privateKey, data, }: { privateKey: Uint8Array<ArrayBufferLike>; data: ToBytesInputTypes; }): string
@metamask/eth-sig-util · decryptSafely({ encryptedData, privateKey, }: { encryptedData: EthEncryptedData; privateKey: string; }): string({ encryptedData, privateKey, }: { encryptedData: EthEncryptedData; privateKey: string; }): Promise<string>
@metamask/eth-sig-util · encryptSafely({ publicKey, data, version, }: { publicKey: string; data: unknown; version: string; }): EthEncryptedData({ publicKey, data, version, }: { publicKey: string; data: unknown; version: string; }): Promise<EthEncryptedData>
@metamask/eth-sig-util · signTypedData<V extends SignTypedDataVersion, T extends MessageTypes>({ privateKey, data, version, }: { privateKey: Buffer; data: V extends "V1" ? TypedDataV1 : TypedMessage<T>; version: V; }): string<V extends SignTypedDataVersion, T extends MessageTypes>({ privateKey, data, version, }: { privateKey: Uint8Array<ArrayBufferLike>; data: V extends "V1" ? TypedDataV1 : TypedMessage<T>; version: V; }): string
@metamask/eth-sig-util · TypedDataUtils{ encodeData: (primaryType: string, data: Record<string, unknown>, types: Record<string, MessageTypeProperty[]>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4) => Buffer; encodeType: (primaryType: string, types: Record<string, MessageTypeProperty[]>) => string; findTypeDependencies: (primaryType: string, types: Record<string, MessageTypeProperty[]>, results?: Set<string> | undefined) => Set<string>; hashStruct: (primaryType: string, data: Record<string, unknown>, types: Record<string, MessageTypeProperty[]>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4) => Buffer; ha…{ encodeData: (primaryType: string, data: Record<string, unknown>, types: Record<string, MessageTypeProperty[]>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4) => Uint8Array<ArrayBufferLike>; encodeType: (primaryType: string, types: Record<string, MessageTypeProperty[]>) => string; findTypeDependencies: (primaryType: string, types: Record<string, MessageTypeProperty[]>, results?: Set<string> | undefined) => Set<string>; hashStruct: (primaryType: string, data: Record<string, unknown>, types: Record<string, MessageTypeProperty[]>, version: SignTypedDataVersion.V3 | SignTypedDataVers…
@metamask/eth-sig-util · extractPublicKey({ data, signature, }: { data: ToBufferInputTypes; signature: string; }): string({ data, signature, }: { data: ToBytesInputTypes; signature: string; }): string
@metamask/eth-sig-util · getEncryptionPublicKey(privateKey: string): string(privateKey: string): Promise<string>
@metamask/eth-sig-util · hashEIP7702Authorization(authorization: EIP7702Authorization): Buffer(authorization: EIP7702Authorization): Uint8Array<ArrayBufferLike>
@metamask/eth-sig-util · recoverPersonalSignature({ data, signature, }: { data: ToBufferInputTypes; signature: string; }): string({ data, signature, }: { data: ToBytesInputTypes; signature: string; }): string
@metamask/eth-sig-util · signEIP7702Authorization({ privateKey, authorization, }: { privateKey: Buffer; authorization: EIP7702Authorization; }): string({ privateKey, authorization, }: { privateKey: Uint8Array<ArrayBufferLike>; authorization: EIP7702Authorization; }): string

क्लास या इंटरफ़ेस के हटाए गए सदस्य

कुछ नहीं मिला।

क्लास या इंटरफ़ेस के बदले गए सदस्य

कुछ नहीं मिला।

नए डिप्रिकेटेड

कुछ नहीं मिला।

आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)

पहलेबाद में
engines.node^22 || ^24 || >=26^22.14.0 || ^24 || ^26

इन संस्करणों के बीच का changelog

पैकेज के लेखकों द्वारा प्रकाशित पाठ, जैसा है वैसा दिखाया गया।

10.0.0
### Changed

- **BREAKING:** Drop CommonJS support ([#11349](https://github.com/MetaMask/core/pull/11349), [#11362](https://github.com/MetaMask/core/pull/11362))
  - This package is now ESM-only, but can still be used in CommonJS projects via `require(esm)` in modern Node.js versions (22+), or dynamic imports in older Node.js versions.
- **BREAKING:** Make `encrypt`, `encryptSafely`, `decrypt`, `decryptSafely`, and `getEncryptionPublicKey` asynchronous ([#11388](https://github.com/MetaMask/core/pull/11388))
  - These functions now return a `Promise`. Callers must `await` the result.
  - The encrypted data format is unchanged, so data encrypted by previous versions can still be decrypted.
  - Decrypting with an invalid nonce length now throws an error from `@noble/ciphers` instead of `bad nonce size`.
- **BREAKING:** Bump TypeScript target to ES2022 ([#11348](https://github.com/MetaMask/core/pull/11348))
- **BREAKING:** `TypedDataUtils.encodeData`, `TypedDataUtils.hashStruct`, `TypedDataUtils.hashType`, `TypedDataUtils.eip712Hash`, `TypedDataUtils.eip712DomainHash`, and `hashEIP7702Authorization` now return a `Uint8Array` instead of a `Buffer` ([#11394](https://github.com/MetaMask/core/pull/11394))
- **BREAKING:** Objects with a `toArray` or `toBuffer` method are no longer accepted as the `data` of `personalSign`, `recoverPersonalSignature`, and `extractPublicKey`, or as `bytes` values in `V1` typed data ([#11394](https://github.com/MetaMask/core/pull/11394))
- `Uint8Array` is now accepted as part of the arguments of `personalSign`, `signTypedData`, `signEIP7702Authorization`, and `concatSig`, instead of `Buffer` ([#11394](https://github.com/MetaMask/core/pull/11394))
- Bump `@metamask/utils` from `^11.0.1` to `^12.0.2` ([#11349](https://github.com/MetaMask/core/pull/11349), [#11474](https://github.com/MetaMask/core/pull/11474))
- Bump `ethereum-cryptography` from `^2.1.2` to `^3.2.0` ([#11349](https://github.com/MetaMask/core/pull/11349))
- Bump `@ethereumjs/util` from `^8.1.0` to `^9.1.0` ([#11394](https://github.com/MetaMask/core/pull/11394))
- Bump `@ethereumjs/rlp` from `^4.0.1` to `^5.0.2` ([#11394](https://github.com/MetaMask/core/pull/11394))
- This package was migrated from `MetaMask/eth-sig-util` to the
  `MetaMask/core` monorepo ([#11327](https://github.com/MetaMask/core/pull/11327))
  - See [`MetaMask/eth-sig-util`](https://github.com/MetaMask/eth-sig-util/blob/73725fc31a51e4d5f6b72d8e5f470c0b10c9d57f/CHANGELOG.md)
    for the original changelog.

### Fixed

- Correct padding calculation so that every ciphertext is a multiple of 2048 bytes ([#11386](https://github.com/MetaMask/core/pull/11386))
- Reject non-integer and unsafe-integer `chainId` and `nonce` values in `signEIP7702Authorization`, `recoverEIP7702Authorization`, and `hashEIP7702Authorization` ([#11392](https://github.com/MetaMask/core/pull/11392))

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/eth-sig-util@10.0.0...HEAD
[10.0.0]: https://github.com/MetaMas

अपने AI एजेंट को ये तथ्य दें

Vigia एक मुफ़्त MCP सर्वर है: आपका कोडिंग एजेंट कोड लिखने से पहले वर्ज़न, ब्रेकिंग बदलाव और कमज़ोरियाँ जाँचता है। न साइनअप, न API कुंजी।

claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp

Cursor में जोड़ेंVS Code में जोड़ें★ GitHub पर स्टार दें

कोई भी दूसरा MCP क्लाइंट
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }

एजेंट स्किल (SKILL.md): एजेंट को बताती है कि Vigia कब इस्तेमाल करना है · पुल रिक्वेस्ट के लिए GitHub Action

अक्सर पूछे जाने वाले प्रश्न

@metamask/eth-sig-util को 9 से 10 पर अपग्रेड करने पर कौन-से असंगत बदलाव हैं?

@metamask/eth-sig-util 9.0.0 और 10.0.0 के बीच Vigia को 0 हटाए गए एक्सपोर्ट, 14 बदले गए सिग्नेचर और 0 हटाए या बदले गए क्लास/इंटरफ़ेस सदस्य मिले।

@metamask/eth-sig-util 10 में क्या डिप्रिकेट हुआ?

@metamask/eth-sig-util 10.0.0 में 0 एक्सपोर्ट या सदस्य नए रूप से डिप्रिकेटेड चिह्नित हैं।

एजेंटों के लिए

GET https://vigia.coredls.cloud/v1/packages/npm/@metamask/eth-sig-util/upgrade?from=9.0.0&to=10.0.0