-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve link warnings #1994
base: main
Are you sure you want to change the base?
Resolve link warnings #1994
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ import { Bytes } from '../bytes.js'; | |
export { createForeignCurve, ForeignCurve }; | ||
|
||
// internal API | ||
export { toPoint, FlexiblePoint }; | ||
export { toPoint, FlexiblePoint, ForeignCurveNotNeeded }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By exporting
|
||
|
||
type FlexiblePoint = { | ||
x: AlmostForeignField | Field3 | bigint | number; | ||
|
@@ -205,6 +205,7 @@ class ForeignCurve { | |
} | ||
|
||
/** | ||
* @internal | ||
* Checks whether this curve point is constant. | ||
* | ||
* See {@link FieldVar} to understand constants vs variables. | ||
|
@@ -398,6 +399,9 @@ class ForeignCurve { | |
} | ||
} | ||
|
||
/** | ||
* @see: {@link ForeignCurve} | ||
*/ | ||
class ForeignCurveNotNeeded extends ForeignCurve { | ||
constructor(g: { | ||
x: AlmostForeignField | Field3 | bigint | number; | ||
|
@@ -421,7 +425,7 @@ class ForeignCurveNotNeeded extends ForeignCurve { | |
* const Curve = createForeignCurve(Crypto.CurveParams.Secp256k1); | ||
* ``` | ||
* | ||
* `createForeignCurve(params)` takes curve parameters {@link CurveParams} as input. | ||
* `createForeignCurve(params)` takes curve parameters `CurveParams` as input. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the link to |
||
* We support `modulus` and `order` to be prime numbers up to 259 bits. | ||
* | ||
* The returned {@link ForeignCurveNotNeeded} class represents a _non-zero curve point_ and supports standard | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,11 +91,11 @@ class ForeignField { | |
* ```ts | ||
* let x = new ForeignField(5); | ||
* ``` | ||
* | ||
* | ||
* Note: Inputs must be range checked if they originate from a different field with a different modulus or if they are not constants. | ||
* | ||
* | ||
* - When constructing from another {@link ForeignField} instance, ensure the modulus matches. If not, check the modulus using `Gadgets.ForeignField.assertLessThan()` and handle appropriately. | ||
* - When constructing from a {@link Field3} array, ensure all elements are valid Field elements and range checked. | ||
* - When constructing from a `Field3` array, ensure all elements are valid Field elements and range checked. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the link to |
||
* - Ensure constants are correctly reduced to the modulus of the field. | ||
*/ | ||
constructor(x: ForeignField | Field3 | bigint | number | string) { | ||
|
@@ -129,6 +129,7 @@ class ForeignField { | |
} | ||
|
||
/** | ||
* @internal | ||
* Checks whether this field element is a constant. | ||
* | ||
* See {@link FieldVar} to understand constants vs variables. | ||
|
@@ -138,6 +139,7 @@ class ForeignField { | |
} | ||
|
||
/** | ||
* @internal | ||
* Convert this field element to a constant. | ||
* | ||
* See {@link FieldVar} to understand constants vs variables. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ class UInt64 extends CircuitValue { | |
return this.value.toString(); | ||
} | ||
/** | ||
* Turns the {@link UInt64} into a {@link BigInt}. | ||
* Turns the {@link UInt64} into a BigInt. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious why you removed the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I thought There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would also be valid to turn this rule off like we did with |
||
* @returns | ||
*/ | ||
toBigInt() { | ||
|
@@ -575,7 +575,7 @@ class UInt32 extends CircuitValue { | |
return this.value.toString(); | ||
} | ||
/** | ||
* Turns the {@link UInt32} into a {@link BigInt}. | ||
* Turns the {@link UInt32} into a BigInt. | ||
*/ | ||
toBigint() { | ||
return this.value.toBigInt(); | ||
|
@@ -1214,7 +1214,7 @@ class Int64 extends CircuitValue implements BalanceChange { | |
} | ||
|
||
/** | ||
* Turns the {@link Int64} into a {@link BigInt}. | ||
* Turns the {@link Int64} into a BigInt. | ||
*/ | ||
toBigint() { | ||
let abs = this.magnitude.toBigInt(); | ||
|
@@ -1287,8 +1287,8 @@ class Int64 extends CircuitValue implements BalanceChange { | |
* Int64.from(5).neg(); | ||
* ``` | ||
* | ||
* @see {@link Int64#from} for creating Int64 instances | ||
* @see {@link Int64#zero} for the zero constant | ||
* @see {@link Int64.from} for creating Int64 instances | ||
* @see {@link Int64.zero} for the zero constant | ||
* | ||
* @throws {Error} Implicitly, if the internal Provable.if condition fails | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,10 @@ | |
}, | ||
"entryPoints": [ | ||
"src/index.ts", | ||
"src/lib/mina/account-update.ts", | ||
"src/lib/provable/crypto/foreign-curve.ts", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Foreign curves are already public: https://docs.minaprotocol.com/zkapps/o1js-reference/classes/ForeignCurve This change makes all the doc comments exposed in the file available for other files to reference in |
||
"src/lib/provable/field.ts", | ||
"src/lib/provable/foreign-field.ts", | ||
"src/lib/provable/bool.ts", | ||
"src/lib/provable/group.ts", | ||
"src/lib/provable/int.ts", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this link, which was not functional in any case.