Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ keywords:
- methods
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />


# o1js Basic Concepts

o1js is a TypeScript (TS) library for writing general-purpose zero knowledge (zk) programs and writing zk smart contracts for Mina.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/bitwise-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ keywords:
- o1js
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Bitwise Operations

Bitwise operations manipulate individual bits within a binary representation of a number. They can, at times, resemble boolean operations but apply to a sequence of bits instead of booleans. Bitwise operations are generally available in most programming languages, including TypeScript. o1js provides versions of them that operate on `Field` elements and result in the necessary circuit constraints to generate a zero knowledge proof of the computation. This is especially useful when implementing hashing algorithms such as SHA256.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/circuit-writing-primer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ keywords:
- o1js
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Overview of the circuit-writing features in o1js

o1js is a library for writing zk circuits in TypeScript. While many high-level features are abstracted away from the circuit level, this article will focus specifically on the tools that are specific to the unique nature of writing circuits.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/custom-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ keywords:
- zkApps updates
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Custom Token API

You can use o1js to perform common token operations, such as minting, burning, and sending tokens.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/ecdsa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ keywords:
- blockchain
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# ECDSA

ECDSA, or Elliptic Curve Digital Signature Algorithm, is a cryptographic algorithm used to sign and verify messages. It is used in many blockchains, including Ethereum, to sign transactions.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/foreign-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ keywords:
- o1js
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Foreign Field Arithmetic

A foreign field is a [finite field](https://en.wikipedia.org/wiki/Modular_arithmetic) different from the native field of the proof system. o1js exposes operations like modular addition and multiplication that work in any finite field of size less than `2^259`.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/gadgets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ keywords:
- blockchain
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Gadgets

Gadgets are small, reusable low-level building blocks that simplify the process of creating new cryptographic primitives. Most gadgets build upon custom gates and act as low-level accelerators in the proof system.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ keywords:
- typescript library
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

:::info

To protect end users and ensure your zkApps are secure, consider the information at [Security and zkApps](/zkapps/writing-a-zkapp/introduction-to-zkapps/secure-zkapps) while architecting your solution and consider a third-party security audit before deploying to Mina mainnet.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/indexed-merkle-map.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ description:
- data structures
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

:::experimental

The Indexed Merkle Map API is currently an experimental feature.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/keccak.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ keywords:
- data structures
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Keccak (SHA-3)

Keccak is a flexible cryptographic hash function that provides more security than traditional SHA hash algorithms.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/merkle-tree.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ keywords:
- data structures
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Merkle Tree

zkApp accounts can store only a limited amount of data on chain so that Mina's chain remains succinct and does not become bloated.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/recursion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ keywords:
- blockchain compression
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Recursion

Kimchi, the custom proof system that backs o1js, supports arbitrary infinite recursive proof construction of circuits through integration with the Pickles recursive system. Mina Protocol is the only blockchain that offers infinite recursion.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/o1js/sha256.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ keywords:
- data structures
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# SHA-256

SHA-2 is a set of cryptographic hash functions designed by the National Security Agency (NSA) as an improved version of SHA-1, offering enhanced security and comprising multiple variants based on hash size, such as SHA-256 and SHA-512.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ keywords:
- mina archive node
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

:::caution Warning
The reducer API in o1js is currently not safe to use in production applications. The `reduce()` method breaks if more than the hard-coded number (default: 32) of actions are pending. Work is actively in progress to mitigate this limitation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ keywords:
- tokencontract
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

:::info

If you want to create a fungible token you can use the
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/writing-a-zkapp/feature-overview/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ keywords:
- transaction
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Events

Events are _public_ arbitrary information that can be passed along with a transaction. If your zkApp allows users to publish a message, for example, those messages could be events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ keywords:
- blockchain
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# How to Fetch Events and Actions

[Events](#events) and [Actions](#actions-and-reducer) are two distinct mechanisms for logging information alongside a transaction:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ keywords:
- succinctness
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

:::experimental

Offchain storage is currently an experimental feature and is subject to change in the future.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ keywords:
- network state
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# On-Chain Values

In a zkApp, you can access the current [on-chain state](/zkapps/writing-a-zkapp/introduction-to-zkapps/how-to-write-a-zkapp#on-chain-state) and many other on-chain values of the account.
Expand Down
4 changes: 4 additions & 0 deletions docs/zkapps/writing-a-zkapp/feature-overview/permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ keywords:
- authorization
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Permissions

Permissions are an integral part of zkApp development because they determine who has the authority to interact and make changes to a specific part of a smart contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ keywords:
- account timing
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Time-Locked Accounts

Time-locking allows you to pay someone in MINA or other custom tokens subject to a vesting schedule. Tokens are initially locked and become available for withdrawal only after a certain time or gradually according to a specific schedule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ keywords:
- blockchain
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# ZkApp Upgradability

The Mina protocol allows for the upgrading of verification keys on-chain. This article will demonstrate how to upgrade a ZkApp.
Expand Down
5 changes: 5 additions & 0 deletions docs/zkapps/writing-a-zkapp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ keywords:
- quickstart zkapps
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />


# zkApps Overview

<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ keywords:
- quickstart zkapps
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# zkApps Getting Started

You can start writing zkApps with just a few steps. The focus of this Getting Started Guide is a high-level workflow to build and deploy quickly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ keywords:
- configure a zkapp
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# How to Deploy a zkApp

Before deploying, you must first define a few settings, such as which network you are deploying your zkApp to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ keywords:
- Auro Wallet
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# How to Write a zkApp UI

A zkApp consists of a smart contract and a UI to interact with it. To allow users to interact with your smart contract in a web browser, you typically want to build a website UI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ keywords:
- zero knowledge proofs
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# How to Write a zkApp

A zkApp consists of a smart contract and a UI to interact with it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ keywords:
- off-chain state
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# How zkApps Work

zkApps run in the latest versions of [Chrome](https://www.google.com/chrome/index.html), [Firefox](https://www.mozilla.org/en-US/firefox/new/), [Edge](https://microsoft.com/edge), and [Brave](https://brave.com/) web browsers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ keywords:
- install zkApp CLI
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# zkApp CLI Installation

Install and use the zkApp CLI to scaffold, write, test, and deploy zkApps (zero knowledge apps) for Mina Protocol using recommended best practices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ keywords:
- authorization types
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />


# Interacting With Mina

Now that you know about writing zkApp methods, it's time to learn how users can call these methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ keywords:
- zero knowledge proofs
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Security and zkApps

On this page, you will find guidance for how to think about security when building zkApps. We also provide a list of best practices and common pitfalls to help you avoid vulnerabilities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ keywords:
- on-chain state
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Smart Contracts

You write smart contracts by extending the base class `SmartContract`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ keywords:
- using zk lightnet
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

:::caution

Use of the **Lightnet** is appropriate for the **local development and testing** only. It is **not** intended to replicate all aspects of the real public networks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ keywords:
- Docker test
---

import MigrateBanner from '@site/src/components/snippets/migrate-banner.mdx';

<MigrateBanner />

# Testing zkApps Locally

Before you can test your zkApps, create automated tests for your smart contract and test with a simulated local blockchain. Test automation is essential to ensure your code is well-tested during development.
Expand Down
5 changes: 5 additions & 0 deletions src/components/snippets/migrate-banner.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Admonition from '@theme/Admonition';

<Admonition type="info" title="New Home!">
🚀 o1js reference documentation is now available at the new [o1Labs docs site](https://docs.o1labs.org/o1js).
</Admonition>