New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

o1js

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

o1js - npm Package Versions

234

2.3.0

Diff
o1-labs
published 2.3.0 •

Changelog

Source

2.3.0

Added

  • Exported the type FlexibleBytes, previously being used only internally https://github.com/o1-labs/o1js/pull/2015.
  • Gadgets for 224, 384 and 512 bit variants of SHA2 https://github.com/o1-labs/o1js/pull/1957
  • setFee and setFeePerSnarkCost for Transaction and PendingTransaction https://github.com/o1-labs/o1js/pull/1968
  • Doc comments for various ZkProgram methods https://github.com/o1-labs/o1js/pull/1974
  • MerkleList.popOption() for popping the last element and also learning if there was one https://github.com/o1-labs/o1js/pull/1997
  • Added custom header support for Fetch methods such as fetchEvents, fetchActions etc. and to Mina instance. Also added two new methods setMinaDefaultHeaders and setArchiveDefaultHeaders https://github.com/o1-labs/o1js/pull/2004
  • Added new method CircuitString.setEncoding() to change default behavior of the CircuitString encoding, possible value is "ascii" | "uft-8" default to "ascii". Also added an optional encoding: CircuitStringEncoding parameter in .toString() and .fromString() to switch encoding temporary.
  • Added style rules for contributors https://github.com/o1-labs/o1js/pull/2012
  • Add new helper functions Bool.anyTrue(xs) and Bool.allTrue(xs). https://github.com/o1-labs/o1js/pull/2038
  • Add UInt64.toBytes()l https://github.com/o1-labs/o1js/pull/2060 @kadirchan

Changed

  • Sort order for actions now includes the transaction sequence number and the exact account id sequence https://github.com/o1-labs/o1js/pull/1917
  • Updated typedoc version for generating docs https://github.com/o1-labs/o1js/pull/1973
  • Enable to pass normal JS values (e.g., bigint instead of Field) to ZkProgram provers https://github.com/o1-labs/o1js/pull/1934
    • Also improves the supported JS values for a few important types like Signature and UIntX
  • ECDSA verifySignedHash() accepts hash Bytes directly for easy use with alternative hash functions https://github.com/o1-labs/o1js/pull/2005

Fixed

  • Fix behavior of initializeBindings() when called concurrently, to improve error messages in common failure scenarios https://github.com/o1-labs/o1js/pull/1996
  • Fix ZkProgram public input/output types https://github.com/o1-labs/o1js/pull/1998
o1-labs
published 2.2.0 •

Changelog

Source

2.2.0 - 2024-12-10

Added

  • ZkProgram to support non-pure provable types as inputs and outputs https://github.com/o1-labs/o1js/pull/1828
  • APIs for recursively proving a ZkProgram method from within another https://github.com/o1-labs/o1js/pull/1931 https://github.com/o1-labs/o1js/pull/1932
    • let recursive = Experimental.Recursive(program);
    • recursive.<methodName>(...args): Promise<PublicOutput>
    • recursive.<methodName>.if(condition, ...args): Promise<PublicOutput>
    • This also works within the same program, as long as the return value is type-annotated
  • Add enforceTransactionLimits parameter on Network https://github.com/o1-labs/o1js/issues/1910
  • Method for optional types to assert none https://github.com/o1-labs/o1js/pull/1922
  • Increased maximum supported amount of methods in a SmartContract or ZkProgram to 30. https://github.com/o1-labs/o1js/pull/1918
  • Expose low-level conversion methods Proof.{_proofToBase64,_proofFromBase64} https://github.com/o1-labs/o1js/pull/1928
  • Expore maxProofsVerified() and a Proof class directly on ZkPrograms https://github.com/o1-labs/o1js/pull/1933

Changed

  • Changed an internal type to improve IntelliSense on ZkProgram methods https://github.com/o1-labs/o1js/pull/1933
  • Updated o1js nix devshell to build rust on all executions of npm run build:update-bindings

Fixed

  • Compiling stuck in the browser for recursive zkprograms https://github.com/o1-labs/o1js/pull/1906
  • Error message in rangeCheck16 gadget https://github.com/o1-labs/o1js/pull/1920
  • Deprecate testnet networkId in favor of devnet https://github.com/o1-labs/o1js/pull/1938
  • Fix event data type inconsistency between LocalBlockchain and Mina https://github.com/o1-labs/o1js/pull/1975
o1-labs
published 2.1.0 •

Changelog

Source

2.1.0 - 2024-11-13

Added

  • Support secp256r1 in elliptic curve and ECDSA gadgets https://github.com/o1-labs/o1js/pull/1885

Fixed

  • Witness generation error in Gadgets.arrayGet() when accessing out-of-bounds indices https://github.com/o1-labs/o1js/pull/1886
o1-labs
published 2.0.0 •

Changelog

Source

2.0.0

Breaking Changes

  • The divMod32() gadget was modified to accept nBits instead of quotientBits, and assert it is in the range [0, 2**255) to address an issue previously where the bound on quotientBits was too low https://github.com/o1-labs/o1js/pull/1763.
  • Provable.equal() now turns both types into canonical form before comparing them https://github.com/o1-labs/o1js/pull/1759
    • Removed implicit version Provable.equal(x, y) where you didn't have to pass in the type
  • The return signature of a zkProgram has changed. https://github.com/o1-labs/o1js/pull/1809
    • A zkProgram method must now explicitly define the return type of the method when the method has a public or auxiliary output defined.
    • The return type of a proven method has changed as a result of this.
  • Various breaking constraint changes in internal methods or circuits because of audit fix.
  • Removal of various deprecated methods and functions.
    • Promotion of various methods and functions to stable as part of change.
    • A slightly modified encryption and decryption algorithm. https://github.com/o1-labs/o1js/pull/1729
  • Promotion of TokenContractV2 to TokenContract with a correct amount of maximum account updates.

Added

  • ZkProgram methods now support auxiliaryOutput. https://github.com/o1-labs/o1js/pull/1809
    • Each program method now accepts an optional property auxiliaryOutput
    • Auxiliary output is additional output that the zkProgram method returns
  • New method toCanonical() in the Provable<T> interface to protect against incompleteness of certain operations on malicious witness inputs https://github.com/o1-labs/o1js/pull/1759
  • divMod64() division modulo 2^64 that returns the remainder and quotient of the operation
  • addMod64() addition modulo 2^64
  • Bitwise OR via {UInt32, UInt64}.or()
  • BLAKE2B hash function gadget. https://github.com/o1-labs/o1js/pull/1767
o1-labs
published 1.9.1 •

Changelog

Source

1.9.1 - 2024-10-15

Fixes

  • Performance regression when compiling recursive circuits is fixed https://github.com/o1-labs/o1js/pull/1874
  • Decouple offchain state instances from their definitions https://github.com/o1-labs/o1js/pull/1834
o1-labs
published 1.9.0 •

Changelog

Source

1.9.0 - 2024-10-15

Added

  • Added VerificationKey.dummy() method to get the dummy value of a verification key https://github.com/o1-labs/o1js/pull/1852 @rpanic

Changed

  • Make Proof a normal provable type, that can be witnessed and composed into Structs https://github.com/o1-labs/o1js/pull/1847, https://github.com/o1-labs/o1js/pull/1851
    • ZkProgram and SmartContract now also support private inputs that are not proofs themselves, but contain proofs nested within a Struct or array
    • Only SelfProof can still not be nested because it needs special treatment

Fixes

  • Fix verification of serialized proofs done before compiling any circuits https://github.com/o1-labs/o1js/pull/1857
o1-labs
published 1.8.0 •

Changelog

Source

1.8.0 - 2024-09-18

Added

  • Added verifyEthers method to verify Ethereum signatures using the EIP-191 message hashing standard. https://github.com/o1-labs/o1js/pull/1815
    • Added fromEthers method for parsing and converting Ethereum public keys into ForeignCurve points, supporting both compressed and uncompressed formats.
    • Added fromHex method for converting hexadecimal strings into ForeignCurve points.

Fixes

  • Fix incorrect behavior of optional proving for zkPrograms where myProgram.setProofsEnabled(false) wouldn't work when called before myProgram.compile(). https://github.com/o1-labs/o1js/pull/1827
  • Fix incorrect behavior of state.fetch() for custom token contracts. @rpanic https://github.com/o1-labs/o1js/pull/1853
o1-labs
published 1.7.0 •

Changelog

Source

1.7.0 - 2024-09-04

Added

  • Added Encryption.encryptV2() and Encryption.decryptV2() for an updated encryption algorithm that guarantees cipher text integrity.
    • Also added Encryption.encryptBytes() and Encryption.decryptBytes() using the same algorithm.
  • New option proofsEnabled for zkProgram (default value: true), to quickly test circuit logic with proofs disabled https://github.com/o1-labs/o1js/pull/1805
    • Additionally added MyProgram.proofsEnabled to get the internal value of proofsEnabled and MyProgram.setProofsEnabled(proofsEnabled) to set the value dynamically.

Deprecated

  • this.sender.getAndRequireSignature() / getUnconstrained() deprecated in favor of V2 versions due to a vulnerability https://github.com/o1-labs/o1js/pull/1799

Fixes

  • Fix behavior of Int64.modV2() when the input is negative and the remainder should be 0 https://github.com/o1-labs/o1js/pull/1797
o1-labs
published 1.6.0 •

Changelog

Source

1.6.0 - 2024-07-23

Added

  • SmartContract.emitEventIf() to conditionally emit an event https://github.com/o1-labs/o1js/pull/1746
  • Added Encryption.encryptV2() and Encryption.decryptV2() for an updated encryption algorithm that guarantees cipher text integrity.
    • Also added Encryption.encryptBytes() and Encryption.decryptBytes() using the same algorithm.

Changed

  • Reduced maximum bit length for xor, not, and and, operations from 254 to 240 bits to prevent overflow vulnerabilities. https://github.com/o1-labs/o1js/pull/1745
  • Allow using Type instead of Type.provable in APIs that expect a provable type https://github.com/o1-labs/o1js/pull/1751
    • Example: Provable.witness(Bytes32, () => bytes)
  • Automatically wrap and unwrap Unconstrained in fromValue and toValue, so that we don't need to deal with "unconstrained" values outside provable code https://github.com/o1-labs/o1js/pull/1751
o1-labs
published 1.5.1 •