Changelog
FlexibleBytes
, previously being used only internally
https://github.com/o1-labs/o1js/pull/2015.setFee
and setFeePerSnarkCost
for Transaction
and PendingTransaction
https://github.com/o1-labs/o1js/pull/1968MerkleList.popOption()
for popping the last element and also learning if there was one https://github.com/o1-labs/o1js/pull/1997Fetch
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/2004CircuitString.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.Bool.anyTrue(xs)
and Bool.allTrue(xs)
. https://github.com/o1-labs/o1js/pull/2038UInt64.toBytes()
l https://github.com/o1-labs/o1js/pull/2060 @kadirchanbigint
instead of Field
) to ZkProgram provers https://github.com/o1-labs/o1js/pull/1934
Signature
and UIntX
verifySignedHash()
accepts hash Bytes
directly for easy use with alternative hash functions https://github.com/o1-labs/o1js/pull/2005initializeBindings()
when called concurrently, to improve error messages in common failure scenarios https://github.com/o1-labs/o1js/pull/1996ZkProgram
public input/output types https://github.com/o1-labs/o1js/pull/1998Changelog
2.2.0 - 2024-12-10
ZkProgram
to support non-pure provable types as inputs and outputs https://github.com/o1-labs/o1js/pull/1828let recursive = Experimental.Recursive(program);
recursive.<methodName>(...args): Promise<PublicOutput>
recursive.<methodName>.if(condition, ...args): Promise<PublicOutput>
enforceTransactionLimits
parameter on Network https://github.com/o1-labs/o1js/issues/1910SmartContract
or ZkProgram
to 30. https://github.com/o1-labs/o1js/pull/1918Proof.{_proofToBase64,_proofFromBase64}
https://github.com/o1-labs/o1js/pull/1928maxProofsVerified()
and a Proof
class directly on ZkPrograms https://github.com/o1-labs/o1js/pull/1933npm run build:update-bindings
rangeCheck16
gadget https://github.com/o1-labs/o1js/pull/1920testnet
networkId
in favor of devnet
https://github.com/o1-labs/o1js/pull/1938Changelog
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
Provable.equal(x, y)
where you didn't have to pass in the typeTokenContractV2
to TokenContract
with a correct amount of maximum account updates.ZkProgram
methods now support auxiliaryOutput
. https://github.com/o1-labs/o1js/pull/1809
auxiliaryOutput
toCanonical()
in the Provable<T>
interface to protect against incompleteness of certain operations on malicious witness inputs https://github.com/o1-labs/o1js/pull/1759divMod64()
division modulo 2^64 that returns the remainder and quotient of the operationaddMod64()
addition modulo 2^64{UInt32, UInt64}.or()
Changelog
1.9.0 - 2024-10-15
VerificationKey.dummy()
method to get the dummy value of a verification key https://github.com/o1-labs/o1js/pull/1852 @rpanicProof
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
SelfProof
can still not be nested because it needs special treatmentChangelog
1.8.0 - 2024-09-18
verifyEthers
method to verify Ethereum signatures using the EIP-191 message hashing standard. https://github.com/o1-labs/o1js/pull/1815
fromEthers
method for parsing and converting Ethereum public keys into ForeignCurve
points, supporting both compressed and uncompressed formats.fromHex
method for converting hexadecimal strings into ForeignCurve
points.myProgram.setProofsEnabled(false)
wouldn't work when called before myProgram.compile()
. https://github.com/o1-labs/o1js/pull/1827state.fetch()
for custom token contracts. @rpanic https://github.com/o1-labs/o1js/pull/1853Changelog
1.7.0 - 2024-09-04
Encryption.encryptV2()
and Encryption.decryptV2()
for an updated encryption algorithm that guarantees cipher text integrity.
Encryption.encryptBytes()
and Encryption.decryptBytes()
using the same algorithm.proofsEnabled
for zkProgram
(default value: true
), to quickly test circuit logic with proofs disabled https://github.com/o1-labs/o1js/pull/1805
MyProgram.proofsEnabled
to get the internal value of proofsEnabled
and MyProgram.setProofsEnabled(proofsEnabled)
to set the value dynamically.this.sender.getAndRequireSignature()
/ getUnconstrained()
deprecated in favor of V2
versions due to a vulnerability https://github.com/o1-labs/o1js/pull/1799Int64.modV2()
when the input is negative and the remainder should be 0 https://github.com/o1-labs/o1js/pull/1797Changelog
1.6.0 - 2024-07-23
SmartContract.emitEventIf()
to conditionally emit an event https://github.com/o1-labs/o1js/pull/1746Encryption.encryptV2()
and Encryption.decryptV2()
for an updated encryption algorithm that guarantees cipher text integrity.
Encryption.encryptBytes()
and Encryption.decryptBytes()
using the same algorithm.xor
, not
, and and
, operations from 254 to 240 bits to prevent overflow vulnerabilities. https://github.com/o1-labs/o1js/pull/1745Type
instead of Type.provable
in APIs that expect a provable type https://github.com/o1-labs/o1js/pull/1751
Provable.witness(Bytes32, () => bytes)
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