New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

124

0.16.0

Diff

Changelog

Source

0.16.0

Breaking changes

  • Protocol change that adds a "transaction version" to the permission to set verification keys https://github.com/MinaProtocol/mina/pull/14407
    • See the relevant RFC for the motivation behind this change
    • Breaks all deployed contracts, as it changes the account update layout

Added

  • Provable type Packed<T> to pack small field elements into fewer field elements https://github.com/o1-labs/o1js/pull/1376
  • Provable type Hashed<T> to represent provable types by their hash https://github.com/o1-labs/o1js/pull/1377
    • This also exposes Poseidon.hashPacked() to efficiently hash an arbitrary type

Changed

  • Reduce number of constraints of ECDSA verification by 5% https://github.com/o1-labs/o1js/pull/1376
o1-labs
published 0.15.4 •

Changelog

Source

0.15.4

Changed

  • Improve performance of Wasm Poseidon hashing by a factor of 13x https://github.com/o1-labs/o1js/pull/1378
    • Speeds up local blockchain tests without proving by ~40%
  • Improve performance of Field inverse https://github.com/o1-labs/o1js/pull/1373
    • Speeds up proving by ~2-4%

Added

  • Configurable networkId when declaring a Mina instance. https://github.com/o1-labs/o1js/pull/1387
    • Defaults to "testnet", the other option is "mainnet"
    • The networkId parameter influences the algorithm used for signatures, and ensures that testnet transactions can't be replayed on mainnet
o1-labs
published 0.15.3 •

Changelog

Source

0.15.3

Added

  • SHA256 hash function exposed via Hash.SHA2_256 or Gadgets.SHA256. https://github.com/o1-labs/o1js/pull/1285

Changed

  • Mina.accountCreationFee() is deprecated in favor of Mina.getNetworkConstants().accountCreationFee. https://github.com/o1-labs/o1js/pull/1367
    • Mina.getNetworkConstants() returns:
      • default network constants if used outside of the transaction scope.
      • actual network constants if used within the transaction scope.

Fixed

  • Fix approving of complex account update layouts https://github.com/o1-labs/o1js/pull/1364
o1-labs
published 0.15.2 •

Changelog

Source

0.15.2

Fixed

  • Fix bug in Hash.hash() which always resulted in an error https://github.com/o1-labs/o1js/pull/1346
o1-labs
published 0.15.1 •

Changelog

Source

0.15.1

Breaking changes

  • Rename Gadgets.rotate() to Gadgets.rotate64() to better reflect the amount of bits the gadget operates on. https://github.com/o1-labs/o1js/pull/1259
  • Rename Gadgets.{leftShift(), rightShift()} to Gadgets.{leftShift64(), rightShift64()} to better reflect the amount of bits the gadget operates on. https://github.com/o1-labs/o1js/pull/1259

Added

  • Non-native elliptic curve operations exposed through createForeignCurve() class factory https://github.com/o1-labs/o1js/pull/1007
  • ECDSA signature verification exposed through createEcdsa() class factory https://github.com/o1-labs/o1js/pull/1240 https://github.com/o1-labs/o1js/pull/1007 https://github.com/o1-labs/o1js/pull/1307
    • For an example, see ./src/examples/crypto/ecdsa
  • Keccak/SHA3 hash function exposed on Keccak namespace https://github.com/o1-labs/o1js/pull/1291
  • Hash namespace which holds all hash functions https://github.com/o1-labs/o1js/pull/999
    • Bytes, provable type to hold a byte array, which serves as input and output for Keccak variants
    • UInt8, provable type to hold a single byte, which is constrained to be in the 0 to 255 range
  • Gadgets.rotate32() for rotation over 32 bit values https://github.com/o1-labs/o1js/pull/1259
  • Gadgets.leftShift32() for left shift over 32 bit values https://github.com/o1-labs/o1js/pull/1259
  • Gadgets.divMod32() division modulo 2^32 that returns the remainder and quotient of the operation https://github.com/o1-labs/o1js/pull/1259
  • Gadgets.rangeCheck32() range check for 32 bit values https://github.com/o1-labs/o1js/pull/1259
  • Gadgets.addMod32() addition modulo 2^32 https://github.com/o1-labs/o1js/pull/1259
  • Expose new bitwise gadgets on UInt32 and UInt64 https://github.com/o1-labs/o1js/pull/1259
    • bitwise XOR via {UInt32, UInt64}.xor()
    • bitwise NOT via {UInt32, UInt64}.not()
    • bitwise ROTATE via {UInt32, UInt64}.rotate()
    • bitwise LEFTSHIFT via {UInt32, UInt64}.leftShift()
    • bitwise RIGHTSHIFT via {UInt32, UInt64}.rightShift()
    • bitwise AND via {UInt32, UInt64}.and()
  • Example for using actions to store a map data structure https://github.com/o1-labs/o1js/pull/1300
  • Provable.constraintSystem() and {ZkProgram,SmartContract}.analyzeMethods() return a summary() method to return a summary of the constraints used by a method https://github.com/o1-labs/o1js/pull/1007
  • assert() asserts that a given statement is true https://github.com/o1-labs/o1js/pull/1285

Fixed

  • Fix stack overflows when calling provable methods with large inputs https://github.com/o1-labs/o1js/pull/1334
  • Fix Local.setProofsEnabled() which would not get picked up by deploy() https://github.com/o1-labs/o1js/pull/1330
  • Remove usage of private class fields in core types like Field, for better type compatibility between different o1js versions https://github.com/o1-labs/o1js/pull/1319
o1-labs
published 0.15.0 •

Changelog

Source

0.15.0

Breaking changes

  • ZkProgram.compile() now returns the verification key and its hash, to be consistent with SmartContract.compile() https://github.com/o1-labs/o1js/pull/1292 @rpanic

Added

  • Foreign field arithmetic exposed through the createForeignField() class factory https://github.com/o1-labs/snarkyjs/pull/985
  • Crypto namespace which exposes elliptic curve and finite field arithmetic on bigints, as well as example curve parameters https://github.com/o1-labs/o1js/pull/1240
  • Gadgets.ForeignField.assertMul() for efficiently constraining products of sums in non-native arithmetic https://github.com/o1-labs/o1js/pull/1262
  • Unconstrained for safely maintaining unconstrained values in provable code https://github.com/o1-labs/o1js/pull/1262
  • Gadgets.rangeCheck8() to assert that a value fits in 8 bits https://github.com/o1-labs/o1js/pull/1288

Changed

  • Change precondition APIs to use "require" instead of "assert" as the verb, to distinguish them from provable assertions. @LuffySama-Dev
    • this.x.getAndAssertEquals() is now this.x.getAndRequireEquals() https://github.com/o1-labs/o1js/pull/1263
    • this.x.assertEquals(x) is now this.x.requireEquals(x) https://github.com/o1-labs/o1js/pull/1263
    • this.account.x.getAndAssertEquals(x) is now this.account.x.requireEquals(x) https://github.com/o1-labs/o1js/pull/1265
    • this.account.x.assertBetween() is now this.account.x.requireBetween() https://github.com/o1-labs/o1js/pull/1265
    • this.network.x.getAndAssertEquals() is now this.network.x.getAndRequireEquals() https://github.com/o1-labs/o1js/pull/1265
  • Provable.constraintSystem() and {ZkProgram,SmartContract}.analyzeMethods() return a print() method for pretty-printing the constraint system https://github.com/o1-labs/o1js/pull/1240

Fixed

  • Fix missing recursive verification of proofs in smart contracts https://github.com/o1-labs/o1js/pull/1302
o1-labs
published 0.14.2 •

Changelog

Source

0.14.2

Breaking changes

  • Change return signature of ZkProgram.analyzeMethods() to be a keyed object https://github.com/o1-labs/o1js/pull/1223

Added

  • Provable non-native field arithmetic:
    • Gadgets.ForeignField.{add, sub, sumchain}() for addition and subtraction https://github.com/o1-labs/o1js/pull/1220
    • Gadgets.ForeignField.{mul, inv, div}() for multiplication and division https://github.com/o1-labs/o1js/pull/1223
  • Comprehensive internal testing of constraint system layouts generated by new gadgets https://github.com/o1-labs/o1js/pull/1241 https://github.com/o1-labs/o1js/pull/1220

Changed

  • Lightnet namespace API updates with added listAcquiredKeyPairs() method https://github.com/o1-labs/o1js/pull/1256
  • Expose raw provable methods of a ZkProgram on zkProgram.rawMethods https://github.com/o1-labs/o1js/pull/1241
  • Reduce number of constraints needed by rotate(), leftShift() and, rightShift() gadgets https://github.com/o1-labs/o1js/pull/1201

Fixed

  • Add a parameter to checkZkappTransaction for block length to check for transaction inclusion. This fixes a case where Transaction.wait() only checked the latest block, which led to an error once the transaction was included in a block that was not the latest. https://github.com/o1-labs/o1js/pull/1239
o1-labs
published 0.14.1 •

Changelog

Source

0.14.1

Added

  • Gadgets.not(), new provable method to support bitwise not. https://github.com/o1-labs/o1js/pull/1198
  • Gadgets.leftShift() / Gadgets.rightShift(), new provable methods to support bitwise shifting. https://github.com/o1-labs/o1js/pull/1194
  • Gadgets.and(), new provable method to support bitwise and. https://github.com/o1-labs/o1js/pull/1193
  • Gadgets.multiRangeCheck() and Gadgets.compactMultiRangeCheck(), two building blocks for non-native arithmetic with bigints of size up to 264 bits. https://github.com/o1-labs/o1js/pull/1216

Fixed

  • Removed array reversal of fetched actions, since they are returned in the correct order. https://github.com/o1-labs/o1js/pull/1258
o1-labs
published 0.14.0 •

Changelog

Source

0.14.0

Breaking changes

  • Constraint optimizations in Field methods and core crypto changes break all verification keys https://github.com/o1-labs/o1js/pull/1171 https://github.com/o1-labs/o1js/pull/1178

Changed

  • ZkProgram has moved out of the Experimental namespace and is now available as a top-level import directly. Experimental.ZkProgram has been deprecated.
  • ZkProgram gets a new input argument name: string which is required in the non-experimental API. The name is used to identify a ZkProgram when caching prover keys. https://github.com/o1-labs/o1js/pull/1200

Added

  • Lightnet namespace to interact with the account manager provided by the lightnet Mina network https://github.com/o1-labs/o1js/pull/1167
  • Internal support for several custom gates (range check, bitwise operations, foreign field operations) and lookup tables https://github.com/o1-labs/o1js/pull/1176
  • Gadgets.rangeCheck64(), new provable method to do efficient 64-bit range checks using lookup tables https://github.com/o1-labs/o1js/pull/1181
  • Gadgets.rotate(), new provable method to support bitwise rotation for native field elements. https://github.com/o1-labs/o1js/pull/1182
  • Gadgets.xor(), new provable method to support bitwise xor for native field elements. https://github.com/o1-labs/o1js/pull/1177
  • Proof.dummy() to create dummy proofs https://github.com/o1-labs/o1js/pull/1188
    • You can use this to write ZkPrograms that handle the base case and the inductive case in the same method.

Changed

  • Use cached prover keys in compile() when running in Node.js https://github.com/o1-labs/o1js/pull/1187
    • Caching is configurable by passing a custom Cache (new export) to compile()
    • By default, prover keys are stored in an OS-dependent cache directory; ~/.cache/pickles on Mac and Linux
  • Use cached setup points (SRS and Lagrange bases) when running in Node.js https://github.com/o1-labs/o1js/pull/1197
    • Also, speed up SRS generation by using multiple threads
    • Together with caching of prover keys, this speeds up compilation time by roughly
      • 86% when everything is cached
      • 34% when nothing is cached
o1-labs
published 0.13.1 •

Changelog

Source

0.13.1

Breaking changes

  • Changes to some verification keys caused by changing the way Struct orders object properties. https://github.com/o1-labs/o1js/pull/1124 @Comdex
    • To recover existing verification keys and behavior, change the order of properties in your Struct definitions to be alphabetical
    • The customObjectKeys option is removed from Struct

Changed

  • Improve prover performance by ~25% https://github.com/o1-labs/o1js/pull/1092
    • Change internal representation of field elements to be JS bigint instead of Uint8Array
  • Consolidate internal framework for testing equivalence of two implementations
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