Socket
Socket
Sign inDemoInstall

@mysten/zklogin

Package Overview
Dependencies
Maintainers
7
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mysten/zklogin - npm Package Compare versions

Comparing version 0.7.9 to 0.7.10

10

CHANGELOG.md
# @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 @@

2

dist/cjs/nonce.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc