Skip to content

Commit 217fbe2

Browse files
committed
docs: type fix lib/
1 parent 4ac507d commit 217fbe2

File tree

18 files changed

+24
-24
lines changed

18 files changed

+24
-24
lines changed

src/lib/mina/v1/account-update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ class AccountUpdate implements Types.AccountUpdate {
11291129
* This function acts as the `check()` method on an `AccountUpdate` that is sent to the Mina node as part of a transaction.
11301130
*
11311131
* Background: the Mina node performs most necessary validity checks on account updates, both in- and outside of circuits.
1132-
* To save constraints, we don't repeat these checks in zkApps in places where we can be sure the checked account udpates
1132+
* To save constraints, we don't repeat these checks in zkApps in places where we can be sure the checked account updates
11331133
* will be part of a transaction.
11341134
*
11351135
* However, there are a few checks skipped by the Mina node, that could cause vulnerabilities in zkApps if

src/lib/mina/v1/mina.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ function Network(
331331
},
332332
transaction(sender: FeePayerSpec, f: () => Promise<void>) {
333333
return toTransactionPromise(async () => {
334-
// TODO we run the transcation twice to be able to fetch data in between
334+
// TODO we run the transaction twice to be able to fetch data in between
335335
let tx = await createTransaction(sender, f, 0, {
336336
fetchMode: 'test',
337337
isFinalRunOutsideCircuit: false,

src/lib/mina/v1/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function createState<T>(defaultValue?: T): InternalStateType<T> {
269269
if (this._contract === undefined)
270270
throw Error('get can only be called when the State is assigned to a SmartContract @state.');
271271
// inside the circuit, we have to cache variables, so there's only one unique variable per on-chain state.
272-
// if we'd return a fresh variable everytime, developers could easily end up linking just *one* of them to the precondition,
272+
// if we'd return a fresh variable every time, developers could easily end up linking just *one* of them to the precondition,
273273
// while using an unconstrained variable elsewhere, which would create a loophole in the proof.
274274
if (
275275
this._contract.cachedVariable !== undefined &&

src/lib/mina/v1/zkapp.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function wrapMethod(
192192
const { id, context } = SmartContractContext.enter(this, selfAccountUpdate(this, methodName));
193193
try {
194194
if (inCompile() || inProver() || inAnalyze()) {
195-
// important to run this with a fresh accountUpdate everytime, otherwise compile messes up our circuits
195+
// important to run this with a fresh accountUpdate every time, otherwise compile messes up our circuits
196196
// because it runs this multiple times
197197
let proverData = inProver() ? zkAppProver.getData() : undefined;
198198
let txId = Mina.currentTransaction.enter({
@@ -635,7 +635,7 @@ class SmartContract extends SmartContractBase {
635635
}
636636

637637
/**
638-
* Manually set the verificaiton key.
638+
* Manually set the verification key.
639639
*/
640640
static setVerificationKeyUnsafe(verificationKey: { data: string; hash: Field | string }) {
641641
SmartContract._verificationKey = {
@@ -776,7 +776,7 @@ super.init();
776776
let inTransaction = Mina.currentTransaction.has();
777777
let inSmartContract = smartContractContext.get();
778778
if (!inTransaction && !inSmartContract) {
779-
// TODO: it's inefficient to return a fresh account update everytime, would be better to return a constant "non-writable" account update,
779+
// TODO: it's inefficient to return a fresh account update every time, would be better to return a constant "non-writable" account update,
780780
// or even expose the .get() methods independently of any account update (they don't need one)
781781
return selfAccountUpdate(this);
782782
}

src/lib/mina/v2/dsl/mina-program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ function proverMethod<
356356
// methods are invoked externally.
357357
//
358358
// We perform shallow evaluation on the roots of account update trees returned by method
359-
// invokations. This requires that all child updates were manually applied before invoking the
359+
// invocations. This requires that all child updates were manually applied before invoking the
360360
// method call. Importantly, with this restriction, methods cannot actually generate new
361361
// children, the children must be passed in as private inputs and constrained accordingly.
362362
// Unproven update arguments which are not at the root of the tree returned by a method must be

src/lib/mina/v2/state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ const StateValues = {
470470
(values, preconditions) => {
471471
for (const i in values.values) {
472472
if (preconditions.preconditions[i].isSatisfied(values.values[i]).not().toBoolean())
473-
throw new Error(`precondition for state field ${i} not satisified`);
473+
throw new Error(`precondition for state field ${i} not satisfied`);
474474
}
475475
},
476476
() => {
@@ -495,7 +495,7 @@ const StateValues = {
495495

496496
// for(const i in state) {
497497
// if(statePreconditions.preconditions[i].isSatisfied(state[i]).not().toBoolean())
498-
// throw new Error(`precondition for state field ${i} not satisified`);
498+
// throw new Error(`precondition for state field ${i} not satisfied`);
499499
// }
500500
// } else {
501501
// // TODO: evaluate these directly on the custom state representation and give meaningful errors

src/lib/proof-system/proof.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class Proof<Input, Output> extends ProofBase<Input, Output> {
202202
let sideloadedKeysCounter = 0;
203203

204204
/**
205-
* The `DynamicProof` class enables circuits to verify proofs using in-ciruit verfication keys.
205+
* The `DynamicProof` class enables circuits to verify proofs using in-ciruit verification keys.
206206
* This is opposed to the baked-in verification keys of the `Proof` class.
207207
*
208208
* In order to use this, a subclass of DynamicProof that specifies the public input and output types along with the maxProofsVerified number has to be created.

src/lib/proof-system/zkprogram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ function ZkProgram<
562562
provers
563563
);
564564

565-
// Object.assign only shallow-copies, hence we cant use this getter and have to define it explicitly
565+
// Object.assign only shallow-copies, hence we can't use this getter and have to define it explicitly
566566
Object.defineProperty(program, 'proofsEnabled', {
567567
get: () => doProving,
568568
});

src/lib/provable/bigint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function createProvableBigInt(modulus: bigint, config?: BigIntParameter) {
314314
/**
315315
* Subtracts one ProvableBigInt from another
316316
* Cost: Cheap
317-
* @param a The ProvableBigInt to substract
317+
* @param a The ProvableBigInt to subtract
318318
* @returns The difference as a ProvableBigInt
319319
*/
320320
sub(a: ProvableBigInt_): ProvableBigInt_ {

src/lib/provable/core/fieldvar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ enum FieldType {
3131
}
3232

3333
/**
34-
* `FieldVar` is the core data type in snarky. It is eqivalent to `Cvar.t` in OCaml.
34+
* `FieldVar` is the core data type in snarky. It is equivalent to `Cvar.t` in OCaml.
3535
* It represents a field element that is part of provable code - either a constant or a variable.
3636
*
3737
* **Variables** end up filling the witness columns of a constraint system.

0 commit comments

Comments
 (0)