Socket
Socket
Sign inDemoInstall

@mysten/zklogin

Package Overview
Dependencies
Maintainers
0
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.0.0-experimental-20240806174754 to 0.0.0-experimental-20240812145036

12

CHANGELOG.md
# @mysten/zklogin
## 0.0.0-experimental-20240806174754
## 0.0.0-experimental-20240812145036
### Patch Changes
- 6f79ed9: Additional check for bigints
## 0.7.14
### Patch Changes
- Updated dependencies [0851b31]
- Updated dependencies [f37b3c2]
- Updated dependencies [f37b3c2]
- @mysten/sui@0.0.0-experimental-20240806174754
- @mysten/bcs@0.0.0-experimental-20240806174754
- @mysten/sui@1.5.0
- @mysten/bcs@1.0.4

@@ -13,0 +19,0 @@ ## 0.7.13

@@ -0,1 +1,2 @@

export declare const BN254_FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
export declare function poseidonHash(inputs: (number | bigint | string)[]): bigint;

@@ -21,2 +21,3 @@ "use strict";

__export(poseidon_exports, {
BN254_FIELD_SIZE: () => BN254_FIELD_SIZE,
poseidonHash: () => poseidonHash

@@ -44,3 +45,10 @@ });

];
const BN254_FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
function poseidonHash(inputs) {
inputs.forEach((x) => {
const b = BigInt(x);
if (b < 0 || b >= BN254_FIELD_SIZE) {
throw new Error(`Element ${b} not in the BN254 field`);
}
});
const hashFN = poseidonNumToHashFN[inputs.length - 1];

@@ -47,0 +55,0 @@ if (hashFN) {

@@ -0,1 +1,2 @@

export declare const BN254_FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
export declare function poseidonHash(inputs: (number | bigint | string)[]): bigint;

@@ -37,3 +37,10 @@ import {

];
const BN254_FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
function poseidonHash(inputs) {
inputs.forEach((x) => {
const b = BigInt(x);
if (b < 0 || b >= BN254_FIELD_SIZE) {
throw new Error(`Element ${b} not in the BN254 field`);
}
});
const hashFN = poseidonNumToHashFN[inputs.length - 1];

@@ -51,4 +58,5 @@ if (hashFN) {

export {
BN254_FIELD_SIZE,
poseidonHash
};
//# sourceMappingURL=poseidon.js.map
{
"name": "@mysten/zklogin",
"version": "0.0.0-experimental-20240806174754",
"version": "0.0.0-experimental-20240812145036",
"description": "Utilities for interacting with zkLogin in Sui",

@@ -41,4 +41,4 @@ "license": "Apache-2.0",

"poseidon-lite": "^0.2.0",
"@mysten/bcs": "0.0.0-experimental-20240806174754",
"@mysten/sui": "0.0.0-experimental-20240806174754"
"@mysten/bcs": "1.0.4",
"@mysten/sui": "1.5.0"
},

@@ -45,0 +45,0 @@ "scripts": {

@@ -42,3 +42,13 @@ // Copyright (c) Mysten Labs, Inc.

export const BN254_FIELD_SIZE =
21888242871839275222246405745257275088548364400416034343698204186575808495617n;
export function poseidonHash(inputs: (number | bigint | string)[]): bigint {
inputs.forEach((x) => {
const b = BigInt(x);
if (b < 0 || b >= BN254_FIELD_SIZE) {
throw new Error(`Element ${b} not in the BN254 field`);
}
});
const hashFN = poseidonNumToHashFN[inputs.length - 1];

@@ -45,0 +55,0 @@

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