@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/{EVMClient-Bmy9czkE.d.mts → EVMClient-CTOtNY8I.d.mts} +1 -1
- package/dist/auth/prepareAuth.d.mts +1 -1
- package/dist/auth/prepareAuth.js +86 -7
- package/dist/auth/prepareAuth.js.map +1 -1
- package/dist/auth/prepareAuth.mjs +1 -1
- package/dist/chains/aptos/index.d.mts +1 -1
- package/dist/chains/avalanche/index.d.mts +2 -2
- package/dist/chains/evm/index.d.mts +5 -4
- package/dist/chains/solana/index.d.mts +1 -1
- package/dist/chains/stacks/index.d.mts +1 -1
- package/dist/chains/starknet/index.d.mts +1 -1
- package/dist/chains/stellar/index.d.mts +2 -1
- package/dist/chains/sui/index.d.mts +1 -1
- package/dist/{chunk-BJH5HJL5.mjs → chunk-2CALEUER.mjs} +87 -8
- package/dist/chunk-2CALEUER.mjs.map +1 -0
- package/dist/{index-CKKUV4J7.d.mts → index-9ercn1sa.d.mts} +2 -2
- package/dist/index.d.mts +7 -6
- package/dist/index.js +94 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/dist/passkey-fh8bo2w-.d.mts +241 -0
- package/dist/passkey.d.mts +2 -182
- package/dist/passkey.js +86 -7
- package/dist/passkey.js.map +1 -1
- package/dist/passkey.mjs +1 -1
- package/dist/{types-DP2CQT8p.d.mts → types-DQ5dtU9x.d.mts} +1 -0
- package/dist/types.d.mts +1 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-BJH5HJL5.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
detectRpId,
|
|
138
138
|
normalizeRelayerOrigin,
|
|
139
139
|
supportsRelatedOrigins
|
|
140
|
-
} from "./chunk-
|
|
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(
|