Skip to content

Commit 04bff8c

Browse files
authored
Merge pull request #1066 from o1-labs/docs/o1js-api-reference-6ebbc23
Build and publish new o1js API reference docs
2 parents 7b031c9 + 334dbfd commit 04bff8c

File tree

240 files changed

+9915
-3498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+9915
-3498
lines changed

.github/workflows/o1js-api-reference.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
# Install dependencies and build o1js
3131
cd o1js
32-
git submodule update --init --recursive
32+
GIT_LFS_SKIP_SMUDGE=1 git submodule update --init --recursive
3333
npm ci && npm run build
3434
cd src/mina-signer && npm ci && npm run build && cd ../../
3535

docs/zkapps/o1js-reference/README.mdx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords:
66
- Reference
77
---
88

9-
# o1js   [![npm version](https://img.shields.io/npm/v/o1js.svg?style=flat)](https://www.npmjs.com/package/o1js) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md)
9+
# o1js   [![npm version](https://img.shields.io/npm/v/o1js.svg?style=flat)](https://www.npmjs.com/package/o1js) [![npm](https://img.shields.io/npm/dm/o1js)](https://www.npmjs.com/package/o1js) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md)
1010

1111
ℹ️ **o1js** is an evolution of [SnarkyJS](https://www.npmjs.com/package/snarkyjs) which saw
1212
49 updated versions over two years of development with 43,141 downloads.
@@ -64,6 +64,7 @@ High-quality community packages from open source developers are available for yo
6464

6565
- **o1js-elgamal** A partially homomorphic encryption library for o1js based on Elgamal encryption: [GitHub](https://github.com/Trivo25/o1js-elgamal) and [npm](https://www.npmjs.com/package/o1js-elgamal)
6666
- **o1js-pack** A library for o1js that allows a zkApp developer to pack extra data into a single Field. [GitHub](https://github.com/45930/o1js-pack) and [npm](https://www.npmjs.com/package/o1js-pack)
67+
- **zk-regex-o1js** A CLI tool for compiling ZK Regex circuits in o1js. [Github](https://github.com/Shigoto-dev19/zk-regex-o1js) and [npm](https://www.npmjs.com/package/zk-regex-o1js)
6768

6869
To include your package, see [Creating high-quality community packages](https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md#creating-high-quality-community-packages).
6970

@@ -86,10 +87,8 @@ To include your package, see [Creating high-quality community packages](https://
8687
| [CircuitString](classes/CircuitString.mdx) | - |
8788
| [DynamicProof](classes/DynamicProof.mdx) | The `DynamicProof` class enables circuits to verify proofs using in-ciruit verfication keys. |
8889
| [EcdsaSignature](classes/EcdsaSignature.mdx) | - |
89-
| [EcdsaSignatureV2](classes/EcdsaSignatureV2.mdx) | - |
9090
| [Field](classes/Field.mdx) | A [Field](classes/Field.mdx) is an element of a prime order [finite field](https://en.wikipedia.org/wiki/Finite_field). |
9191
| [ForeignCurve](classes/ForeignCurve.mdx) | - |
92-
| [ForeignCurveV2](classes/ForeignCurveV2.mdx) | - |
9392
| [ForeignField](classes/ForeignField.mdx) | - |
9493
| [Group](classes/Group.mdx) | An element of a Group. |
9594
| [Hashed](classes/Hashed.mdx) | `Hashed<T>` represents a type `T` by its hash. |
@@ -108,6 +107,7 @@ To include your package, see [Creating high-quality community packages](https://
108107
| [ProofBase](classes/ProofBase.mdx) | - |
109108
| [PublicKey](classes/PublicKey.mdx) | A public key, which is also an address on the Mina network. |
110109
| [Scalar](classes/Scalar.mdx) | Represents a [Scalar](classes/Scalar.mdx). |
110+
| [ScalarField](classes/ScalarField.mdx) | ForeignField representing the scalar field of Pallas and the base field of Vesta |
111111
| [SelfProof](classes/SelfProof.mdx) | - |
112112
| [Sign](classes/Sign.mdx) | - |
113113
| [Signature](classes/Signature.mdx) | A Schnorr [Signature](classes/Signature.mdx) over the Pasta Curves. |
@@ -143,17 +143,24 @@ To include your package, see [Creating high-quality community packages](https://
143143
| [Provable](type-aliases/Provable.mdx) | `Provable<T>` is the general interface for provable types in o1js. |
144144
| [ProvableExtended](type-aliases/ProvableExtended.mdx) | - |
145145
| [ProvableHashable](type-aliases/ProvableHashable.mdx) | - |
146+
| [ProvableHashable](type-aliases/ProvableHashable-1.mdx) | - |
146147
| [ProvablePure](type-aliases/ProvablePure.mdx) | `ProvablePure<T>` is a special kind of [Provable](type-aliases/Provable.mdx) interface, where the "auxiliary" (non-provable) data is empty. |
148+
| [ProvableType](type-aliases/ProvableType.mdx) | - |
149+
| [ProvableTypePure](type-aliases/ProvableTypePure.mdx) | - |
150+
| [ProvableWithEmpty](type-aliases/ProvableWithEmpty.mdx) | - |
147151
| [Reducer](type-aliases/Reducer.mdx) | - |
148152
| [ScalarConst](type-aliases/ScalarConst.mdx) | - |
149153
| [State](type-aliases/State.mdx) | Gettable and settable state that can be checked for equality. |
150154
| [Struct](type-aliases/Struct.mdx) | - |
155+
| [ToProvable](type-aliases/ToProvable.mdx) | - |
151156
| [TransactionPromise](type-aliases/TransactionPromise.mdx) | A `Promise<Transaction>` with some additional methods for making chained method calls |
152157
| [TransactionStatus](type-aliases/TransactionStatus.mdx) | INCLUDED: A transaction that is on the longest chain |
158+
| [TupleN](type-aliases/TupleN.mdx) | tuple type that has the length as generic parameter |
153159
| [Undefined](type-aliases/Undefined.mdx) | - |
154160
| [VarField](type-aliases/VarField.mdx) | - |
155161
| [Void](type-aliases/Void.mdx) | - |
156162
| [WithHash](type-aliases/WithHash.mdx) | - |
163+
| [WithProvable](type-aliases/WithProvable.mdx) | - |
157164
| [Witness](type-aliases/Witness.mdx) | - |
158165
| [ZkProgram](type-aliases/ZkProgram.mdx) | - |
159166
| [ZkappPublicInput](type-aliases/ZkappPublicInput.mdx) | The public input for zkApps consists of certain hashes of the proving |
@@ -170,8 +177,10 @@ To include your package, see [Creating high-quality community packages](https://
170177
| [Keccak](variables/Keccak.mdx) | - |
171178
| [Permissions](variables/Permissions.mdx) | - |
172179
| [Poseidon](variables/Poseidon.mdx) | - |
180+
| [ProvableType](variables/ProvableType.mdx) | - |
173181
| [TokenId](variables/TokenId.mdx) | - |
174182
| [TransactionVersion](variables/TransactionVersion.mdx) | - |
183+
| [TupleN](variables/TupleN.mdx) | - |
175184
| [Undefined](variables/Undefined.mdx) | - |
176185
| [Void](variables/Void.mdx) | - |
177186
| [ZkappPublicInput](variables/ZkappPublicInput.mdx) | - |
@@ -193,10 +202,8 @@ To include your package, see [Creating high-quality community packages](https://
193202
| [checkZkappTransaction](functions/checkZkappTransaction.mdx) | - |
194203
| [circuitMain](functions/circuitMain.mdx) | - |
195204
| [conditionalSwap](functions/conditionalSwap.mdx) | - |
196-
| [createEcdsa](functions/createEcdsa.mdx) | - |
197-
| [createEcdsaV2](functions/createEcdsaV2.mdx) | Create a class [EcdsaSignatureV2](classes/EcdsaSignatureV2.mdx) for verifying ECDSA signatures on the given curve. |
198-
| [createForeignCurve](functions/createForeignCurve.mdx) | - |
199-
| [createForeignCurveV2](functions/createForeignCurveV2.mdx) | Create a class representing an elliptic curve group, which is different from the native [Group](classes/Group.mdx). |
205+
| [createEcdsa](functions/createEcdsa.mdx) | Create a class [EcdsaSignature](classes/EcdsaSignature.mdx) for verifying ECDSA signatures on the given curve. |
206+
| [createForeignCurve](functions/createForeignCurve.mdx) | Create a class representing an elliptic curve group, which is different from the native [Group](classes/Group.mdx). |
200207
| [createForeignField](functions/createForeignField.mdx) | Create a class representing a prime order finite field, which is different from the native [Field](classes/Field.mdx). |
201208
| [declareMethods](functions/declareMethods.mdx) | `declareMethods` can be used in place of the `@method` decorator |
202209
| [declareState](functions/declareState.mdx) | `declareState` can be used in place of the `@state` decorator to declare on-chain state on a SmartContract. |

0 commit comments

Comments
 (0)