@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.
@@ -3718,23 +3718,23 @@ var PolygonIdSdk = (function (exports) {
3718
3718
  * signs prepared payload of size,
3719
3719
  * with a key id
3720
3720
  * @param {KmsKeyId} keyId - key identifier
3721
- * @param {Uint8Array} data - data to sign (32 bytes)
3721
+ * @param {Uint8Array} digest - data to sign (32 bytes)
3722
3722
  * @returns {Promise<Uint8Array>} signature
3723
3723
  */
3724
- async sign(keyId, data) {
3724
+ async sign(keyId, digest) {
3725
3725
  const privateKeyHex = await this.privateKey(keyId);
3726
- return ed25519.sign(OE(data), privateKeyHex);
3726
+ return ed25519.sign(digest, privateKeyHex);
3727
3727
  }
3728
3728
  /**
3729
3729
  * Verifies a signature for the given message and key identifier.
3730
- * @param message - The message to verify the signature against.
3730
+ * @param digest - The message to verify the signature against.
3731
3731
  * @param signatureHex - The signature to verify, as a hexadecimal string.
3732
3732
  * @param keyId - The key identifier to use for verification.
3733
3733
  * @returns A Promise that resolves to a boolean indicating whether the signature is valid.
3734
3734
  */
3735
- async verify(message, signatureHex, keyId) {
3735
+ async verify(digest, signatureHex, keyId) {
3736
3736
  const publicKeyHex = await this.publicKey(keyId);
3737
- return ed25519.verify(signatureHex, OE(message), publicKeyHex);
3737
+ return ed25519.verify(signatureHex, digest, publicKeyHex);
3738
3738
  }
3739
3739
  /**
3740
3740
  * Retrieves the private key for a given keyId from the key store.