Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

o1js

Package Overview
Dependencies
Maintainers
0
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

o1js - npm Package Versions

234

2.2.0

Diff

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

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
o1-labs
published 2.1.0 •

Changelog

Source

2.1.0 - 2024-11-13

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

o1-labs
published 1.5.0 •

Changelog

Source

1.5.0 - 2024-07-09

Breaking changes

  • Fixed a vulnerability in OffchainState where it didn't store the IndexedMerkleTree length onchain and left it unconstrained https://github.com/o1-labs/o1js/pull/1676

Added

  • A warning about the current reducer API limitations, as well as a mention of active work to mitigate them was added to doc comments and examples https://github.com/o1-labs/o1js/pull/1728
  • ForeignField-based representation of scalars via ScalarField https://github.com/o1-labs/o1js/pull/1705
  • Introduced new V2 methods for nullifier operations: isUnusedV2(), assertUnusedV2(), and setUsedV2() https://github.com/o1-labs/o1js/pull/1715
  • Int64.create() method for safe instance creation with canonical zero representation https://github.com/o1-labs/o1js/pull/1735
  • New V2 methods for Int64 operations: fromObjectV2, divV2() https://github.com/o1-labs/o1js/pull/1735
  • Experimental.BatchReducer to reduce actions in batches https://github.com/o1-labs/o1js/pull/1676
    • Avoids the account update limit
    • Handles arbitrary numbers of pending actions thanks to recursive validation of the next batch
  • Add conditional versions of all preconditions: .requireEqualsIf() https://github.com/o1-labs/o1js/pull/1676
  • AccountUpdate.createIf() to conditionally add an account update to the current transaction https://github.com/o1-labs/o1js/pull/1676
  • IndexedMerkleMap.setIf() to set a key-value pair conditionally https://github.com/o1-labs/o1js/pull/1676
  • Provable.assertEqualIf() to conditionally assert that two values are equal https://github.com/o1-labs/o1js/pull/1676
  • Add offchainState.setContractClass() which enables us to declare the connected contract at the top level, without creating a contract instance https://github.com/o1-labs/o1js/pull/1676
    • This is enough to call offchainState.compile()
  • More low-level methods to interact with MerkleList https://github.com/o1-labs/o1js/pull/1676
    • popIfUnsafe(), toArrayUnconstrained() and lengthUnconstrained()

Changed

  • Improve error message when o1js global state is accessed in an invalid way https://github.com/o1-labs/o1js/pull/1676
  • Start developing an internal framework for local zkapp testing https://github.com/o1-labs/o1js/pull/1676
  • Internally upgrade o1js to TypeScript 5.4 https://github.com/o1-labs/o1js/pull/1676

Deprecated

  • Deprecated Nullifier.isUnused(), Nullifier.assertUnused(), and Nullifier.setUsed() methods https://github.com/o1-labs/o1js/pull/1715
  • createEcdsa, createForeignCurve, ForeignCurve and EcdsaSignature deprecated in favor of V2 versions due to a security vulnerability found in the current implementation https://github.com/o1-labs/o1js/pull/1703
  • Int64 constructor, recommending Int64.create() instead https://github.com/o1-labs/o1js/pull/1735
  • Original div() and fromObject, methods in favor of V2 versions https://github.com/o1-labs/o1js/pull/1735
  • Deprecate AccountUpdate.defaultAccountUpdate() in favor of AccountUpdate.default() https://github.com/o1-labs/o1js/pull/1676

Fixed

  • Fix reversed order of account updates when using TokenContract.approveAccountUpdates() https://github.com/o1-labs/o1js/pull/1722
  • Fixed the static check() method in Struct classes to properly handle inheritance, preventing issues with under-constrained circuits. Added error handling to avoid using Struct directly as a field type. https://github.com/o1-labs/o1js/pull/1707
  • Fixed that Option could not be used as @state or event https://github.com/o1-labs/o1js/pull/1736
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