@mysten/zklogin
Advanced tools
Comparing version 0.0.0-experimental-20230821182619 to 0.0.0-experimental-20230822090355
# @mysten/zklogin | ||
## 0.0.0-experimental-20230821182619 | ||
## 0.0.0-experimental-20230822090355 | ||
@@ -8,2 +8,3 @@ ### Patch Changes | ||
- d0750ea0f: rename pin to salt | ||
- a82600f2d: fix nonce calculation | ||
@@ -10,0 +11,0 @@ ## 0.1.1 |
@@ -30,3 +30,3 @@ "use strict"; | ||
function generateNonce(publicKey, maxEpoch, randomness) { | ||
const publicKeyBytes = (0, import_bigint_buffer.toBigIntBE)(Buffer.from(publicKey.toRawBytes())); | ||
const publicKeyBytes = (0, import_bigint_buffer.toBigIntBE)(Buffer.from(publicKey.toSuiBytes())); | ||
const eph_public_key_0 = publicKeyBytes / 2n ** 128n; | ||
@@ -33,0 +33,0 @@ const eph_public_key_1 = publicKeyBytes % 2n ** 128n; |
@@ -7,3 +7,3 @@ import { base64url } from "jose"; | ||
function generateNonce(publicKey, maxEpoch, randomness) { | ||
const publicKeyBytes = toBigIntBE(Buffer.from(publicKey.toRawBytes())); | ||
const publicKeyBytes = toBigIntBE(Buffer.from(publicKey.toSuiBytes())); | ||
const eph_public_key_0 = publicKeyBytes / 2n ** 128n; | ||
@@ -10,0 +10,0 @@ const eph_public_key_1 = publicKeyBytes % 2n ** 128n; |
{ | ||
"name": "@mysten/zklogin", | ||
"version": "0.0.0-experimental-20230821182619", | ||
"version": "0.0.0-experimental-20230822090355", | ||
"description": "Utilities for interacting with zkLogin in Sui", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -13,3 +13,3 @@ // Copyright (c) Mysten Labs, Inc. | ||
export function generateNonce(publicKey: PublicKey, maxEpoch: number, randomness: bigint) { | ||
const publicKeyBytes = toBigIntBE(Buffer.from(publicKey.toRawBytes())); | ||
const publicKeyBytes = toBigIntBE(Buffer.from(publicKey.toSuiBytes())); | ||
const eph_public_key_0 = publicKeyBytes / 2n ** 128n; | ||
@@ -16,0 +16,0 @@ const eph_public_key_1 = publicKeyBytes % 2n ** 128n; |
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
145246