@mysten/zklogin
Advanced tools
Comparing version 0.7.9 to 0.7.10
# @mysten/zklogin | ||
## 0.7.10 | ||
### Patch Changes | ||
- 06a900c1ab: Fix nonce generation inconsistency | ||
- Updated dependencies [06a900c1ab] | ||
- Updated dependencies [45877014d1] | ||
- Updated dependencies [87d6f75403] | ||
- @mysten/sui@1.2.1 | ||
## 0.7.9 | ||
@@ -4,0 +14,0 @@ |
@@ -47,3 +47,3 @@ "use strict"; | ||
const bigNum = (0, import_poseidon.poseidonHash)([eph_public_key_0, eph_public_key_1, maxEpoch, BigInt(randomness)]); | ||
const Z = (0, import_zklogin.toBigEndianBytes)(bigNum, 20); | ||
const Z = (0, import_zklogin.toPaddedBigEndianBytes)(bigNum, 20); | ||
const nonce = import_jose.base64url.encode(Z); | ||
@@ -50,0 +50,0 @@ if (nonce.length !== NONCE_LENGTH) { |
import { toHEX } from "@mysten/bcs"; | ||
import { toBigEndianBytes } from "@mysten/sui/zklogin"; | ||
import { toPaddedBigEndianBytes } from "@mysten/sui/zklogin"; | ||
import { randomBytes } from "@noble/hashes/utils"; | ||
@@ -22,3 +22,3 @@ import { base64url } from "jose"; | ||
const bigNum = poseidonHash([eph_public_key_0, eph_public_key_1, maxEpoch, BigInt(randomness)]); | ||
const Z = toBigEndianBytes(bigNum, 20); | ||
const Z = toPaddedBigEndianBytes(bigNum, 20); | ||
const nonce = base64url.encode(Z); | ||
@@ -25,0 +25,0 @@ if (nonce.length !== NONCE_LENGTH) { |
{ | ||
"name": "@mysten/zklogin", | ||
"version": "0.7.9", | ||
"version": "0.7.10", | ||
"description": "Utilities for interacting with zkLogin in Sui", | ||
@@ -42,3 +42,3 @@ "license": "Apache-2.0", | ||
"@mysten/bcs": "1.0.2", | ||
"@mysten/sui": "1.2.0" | ||
"@mysten/sui": "1.2.1" | ||
}, | ||
@@ -45,0 +45,0 @@ "scripts": { |
@@ -6,3 +6,3 @@ // Copyright (c) Mysten Labs, Inc. | ||
import type { PublicKey } from '@mysten/sui/cryptography'; | ||
import { toBigEndianBytes } from '@mysten/sui/zklogin'; | ||
import { toPaddedBigEndianBytes } from '@mysten/sui/zklogin'; | ||
import { randomBytes } from '@noble/hashes/utils'; | ||
@@ -33,3 +33,3 @@ import { base64url } from 'jose'; | ||
const bigNum = poseidonHash([eph_public_key_0, eph_public_key_1, maxEpoch, BigInt(randomness)]); | ||
const Z = toBigEndianBytes(bigNum, 20); | ||
const Z = toPaddedBigEndianBytes(bigNum, 20); | ||
const nonce = base64url.encode(Z); | ||
@@ -36,0 +36,0 @@ if (nonce.length !== NONCE_LENGTH) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187862
+ Added@mysten/sui@1.2.1(transitive)
- Removed@mysten/sui@1.2.0(transitive)
Updated@mysten/sui@1.2.1