@0xpolygonid/js-sdk 1.11.0 → 1.11.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.
@@ -3665,23 +3665,23 @@ class Ed25519Provider {
3665
3665
  * signs prepared payload of size,
3666
3666
  * with a key id
3667
3667
  * @param {KmsKeyId} keyId - key identifier
3668
- * @param {Uint8Array} data - data to sign (32 bytes)
3668
+ * @param {Uint8Array} digest - data to sign (32 bytes)
3669
3669
  * @returns {Promise<Uint8Array>} signature
3670
3670
  */
3671
- async sign(keyId, data) {
3671
+ async sign(keyId, digest) {
3672
3672
  const privateKeyHex = await this.privateKey(keyId);
3673
- return ed25519.sign(sha256$3(data), privateKeyHex);
3673
+ return ed25519.sign(digest, privateKeyHex);
3674
3674
  }
3675
3675
  /**
3676
3676
  * Verifies a signature for the given message and key identifier.
3677
- * @param message - The message to verify the signature against.
3677
+ * @param digest - The message to verify the signature against.
3678
3678
  * @param signatureHex - The signature to verify, as a hexadecimal string.
3679
3679
  * @param keyId - The key identifier to use for verification.
3680
3680
  * @returns A Promise that resolves to a boolean indicating whether the signature is valid.
3681
3681
  */
3682
- async verify(message, signatureHex, keyId) {
3682
+ async verify(digest, signatureHex, keyId) {
3683
3683
  const publicKeyHex = await this.publicKey(keyId);
3684
- return ed25519.verify(signatureHex, sha256$3(message), publicKeyHex);
3684
+ return ed25519.verify(signatureHex, digest, publicKeyHex);
3685
3685
  }
3686
3686
  /**
3687
3687
  * Retrieves the private key for a given keyId from the key store.