@veridex/sdk 1.1.5 → 1.1.6

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/dist/index.mjs CHANGED
@@ -137,7 +137,7 @@ import {
137
137
  detectRpId,
138
138
  normalizeRelayerOrigin,
139
139
  supportsRelatedOrigins
140
- } from "./chunk-BJH5HJL5.mjs";
140
+ } from "./chunk-2CALEUER.mjs";
141
141
  import {
142
142
  base64URLDecode,
143
143
  base64URLEncode,
@@ -6214,9 +6214,11 @@ var VeridexSDK = class {
6214
6214
  throw new VeridexError("VAULT_NOT_FOUND" /* VAULT_NOT_FOUND */, "Identity not registered. Call registerIdentity() first.");
6215
6215
  }
6216
6216
  const nonce = await this.chain.getNonce(state.identity);
6217
+ const addKeyChainConfig = this.chain.getConfig();
6218
+ const addKeyHubChainId = addKeyChainConfig.hubChainId ?? addKeyChainConfig.wormholeChainId;
6217
6219
  const packedChallenge = ethers7.solidityPacked(
6218
- ["string", "bytes32", "bytes32", "uint256"],
6219
- ["VERIDEX_ADD_KEY", state.identity, newCredential.keyHash, nonce]
6220
+ ["string", "bytes32", "bytes32", "uint256", "uint16"],
6221
+ ["VERIDEX_ADD_KEY", state.identity, newCredential.keyHash, nonce, addKeyHubChainId]
6220
6222
  );
6221
6223
  const signature = await this.passkey.sign(ethers7.getBytes(packedChallenge));
6222
6224
  if (!signer) {
@@ -6272,9 +6274,11 @@ var VeridexSDK = class {
6272
6274
  throw new VeridexError("VAULT_NOT_FOUND" /* VAULT_NOT_FOUND */, "Identity not registered. Call registerIdentity() first.");
6273
6275
  }
6274
6276
  const nonce = await this.chain.getNonce(state.identity);
6277
+ const removeKeyChainConfig = this.chain.getConfig();
6278
+ const removeKeyHubChainId = removeKeyChainConfig.hubChainId ?? removeKeyChainConfig.wormholeChainId;
6275
6279
  const packedChallenge = ethers7.solidityPacked(
6276
- ["string", "bytes32", "bytes32", "uint256"],
6277
- ["VERIDEX_REMOVE_KEY", state.identity, keyToRemove, nonce]
6280
+ ["string", "bytes32", "bytes32", "uint256", "uint16"],
6281
+ ["VERIDEX_REMOVE_KEY", state.identity, keyToRemove, nonce, removeKeyHubChainId]
6278
6282
  );
6279
6283
  const signature = await this.passkey.sign(ethers7.getBytes(packedChallenge));
6280
6284
  const { receipt, sequence } = await evmClient.removeKey(