Changelog
Packed<T>
to pack small field elements into fewer field elements https://github.com/o1-labs/o1js/pull/1376Hashed<T>
to represent provable types by their hash https://github.com/o1-labs/o1js/pull/1377
Poseidon.hashPacked()
to efficiently hash an arbitrary typeChangelog
networkId
when declaring a Mina instance. https://github.com/o1-labs/o1js/pull/1387
"testnet"
, the other option is "mainnet"
networkId
parameter influences the algorithm used for signatures, and ensures that testnet transactions can't be replayed on mainnetChangelog
Hash.SHA2_256
or Gadgets.SHA256
. https://github.com/o1-labs/o1js/pull/1285Mina.accountCreationFee()
is deprecated in favor of Mina.getNetworkConstants().accountCreationFee
. https://github.com/o1-labs/o1js/pull/1367
Changelog
Gadgets.rotate()
to Gadgets.rotate64()
to better reflect the amount of bits the gadget operates on. https://github.com/o1-labs/o1js/pull/1259Gadgets.{leftShift(), rightShift()}
to Gadgets.{leftShift64(), rightShift64()}
to better reflect the amount of bits the gadget operates on. https://github.com/o1-labs/o1js/pull/1259createForeignCurve()
class factory https://github.com/o1-labs/o1js/pull/1007createEcdsa()
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
./src/examples/crypto/ecdsa
Keccak
namespace https://github.com/o1-labs/o1js/pull/1291Hash
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 variantsUInt8
, provable type to hold a single byte, which is constrained to be in the 0 to 255 rangeGadgets.rotate32()
for rotation over 32 bit values https://github.com/o1-labs/o1js/pull/1259Gadgets.leftShift32()
for left shift over 32 bit values https://github.com/o1-labs/o1js/pull/1259Gadgets.divMod32()
division modulo 2^32 that returns the remainder and quotient of the operation https://github.com/o1-labs/o1js/pull/1259Gadgets.rangeCheck32()
range check for 32 bit values https://github.com/o1-labs/o1js/pull/1259Gadgets.addMod32()
addition modulo 2^32 https://github.com/o1-labs/o1js/pull/1259UInt32
and UInt64
https://github.com/o1-labs/o1js/pull/1259
{UInt32, UInt64}.xor()
{UInt32, UInt64}.not()
{UInt32, UInt64}.rotate()
{UInt32, UInt64}.leftShift()
{UInt32, UInt64}.rightShift()
{UInt32, UInt64}.and()
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/1007assert()
asserts that a given statement is true https://github.com/o1-labs/o1js/pull/1285Local.setProofsEnabled()
which would not get picked up by deploy()
https://github.com/o1-labs/o1js/pull/1330Field
, for better type compatibility between different o1js versions https://github.com/o1-labs/o1js/pull/1319Changelog
ZkProgram.compile()
now returns the verification key and its hash, to be consistent with SmartContract.compile()
https://github.com/o1-labs/o1js/pull/1292 @rpaniccreateForeignField()
class factory https://github.com/o1-labs/snarkyjs/pull/985Crypto
namespace which exposes elliptic curve and finite field arithmetic on bigints, as well as example curve parameters https://github.com/o1-labs/o1js/pull/1240Gadgets.ForeignField.assertMul()
for efficiently constraining products of sums in non-native arithmetic https://github.com/o1-labs/o1js/pull/1262Unconstrained
for safely maintaining unconstrained values in provable code https://github.com/o1-labs/o1js/pull/1262Gadgets.rangeCheck8()
to assert that a value fits in 8 bits https://github.com/o1-labs/o1js/pull/1288this.x.getAndAssertEquals()
is now this.x.getAndRequireEquals()
https://github.com/o1-labs/o1js/pull/1263this.x.assertEquals(x)
is now this.x.requireEquals(x)
https://github.com/o1-labs/o1js/pull/1263this.account.x.getAndAssertEquals(x)
is now this.account.x.requireEquals(x)
https://github.com/o1-labs/o1js/pull/1265this.account.x.assertBetween()
is now this.account.x.requireBetween()
https://github.com/o1-labs/o1js/pull/1265this.network.x.getAndAssertEquals()
is now this.network.x.getAndRequireEquals()
https://github.com/o1-labs/o1js/pull/1265Provable.constraintSystem()
and {ZkProgram,SmartContract}.analyzeMethods()
return a print()
method for pretty-printing the constraint system https://github.com/o1-labs/o1js/pull/1240Changelog
ZkProgram.analyzeMethods()
to be a keyed object https://github.com/o1-labs/o1js/pull/1223Gadgets.ForeignField.{add, sub, sumchain}()
for addition and subtraction https://github.com/o1-labs/o1js/pull/1220Gadgets.ForeignField.{mul, inv, div}()
for multiplication and division https://github.com/o1-labs/o1js/pull/1223Lightnet
namespace API updates with added listAcquiredKeyPairs()
method https://github.com/o1-labs/o1js/pull/1256ZkProgram
on zkProgram.rawMethods
https://github.com/o1-labs/o1js/pull/1241rotate()
, leftShift()
and, rightShift()
gadgets https://github.com/o1-labs/o1js/pull/1201checkZkappTransaction
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/1239Changelog
Gadgets.not()
, new provable method to support bitwise not. https://github.com/o1-labs/o1js/pull/1198Gadgets.leftShift() / Gadgets.rightShift()
, new provable methods to support bitwise shifting. https://github.com/o1-labs/o1js/pull/1194Gadgets.and()
, new provable method to support bitwise and. https://github.com/o1-labs/o1js/pull/1193Gadgets.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/1216Changelog
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/1200Lightnet
namespace to interact with the account manager provided by the lightnet Mina network https://github.com/o1-labs/o1js/pull/1167Gadgets.rangeCheck64()
, new provable method to do efficient 64-bit range checks using lookup tables https://github.com/o1-labs/o1js/pull/1181Gadgets.rotate()
, new provable method to support bitwise rotation for native field elements. https://github.com/o1-labs/o1js/pull/1182Gadgets.xor()
, new provable method to support bitwise xor for native field elements. https://github.com/o1-labs/o1js/pull/1177Proof.dummy()
to create dummy proofs https://github.com/o1-labs/o1js/pull/1188
compile()
when running in Node.js https://github.com/o1-labs/o1js/pull/1187
Cache
(new export) to compile()
~/.cache/pickles
on Mac and LinuxChangelog
Struct
orders object properties. https://github.com/o1-labs/o1js/pull/1124 @Comdex
customObjectKeys
option is removed from Struct