Skip to content

Commit

Permalink
🧼 Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed Aug 19, 2024
1 parent d290ba2 commit a6df1b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
6 changes: 1 addition & 5 deletions crypto/arfCurve.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ const arfCurve = (P) => {
return res >= 0n ? res : res + P;
}

/**
* @implements {Point}
*/
class CurvePoint {
return /** @implements {Point} */ class CurvePoint {
/**
* @nosideeffects
* @param {!bigint} x
Expand Down Expand Up @@ -222,7 +219,6 @@ const arfCurve = (P) => {
return this;
}
}
return CurvePoint;
}

export { Point, arfCurve };
9 changes: 5 additions & 4 deletions mina/mina.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { IC, f as sha256F } from "../crypto/sha2";
import base58 from "../util/base58";
import {
uint8ArrayLEtoBigInt,
uint8ArrayLEyeSayıdan
} from "../util/çevir";
import { uint8ArrayLEtoBigInt, uint8ArrayLEyeSayıdan } from "../util/çevir";

/**
* @param {!Uint8Array} buff bytes array of which the last 4 bytes will be
Expand Down Expand Up @@ -60,6 +57,7 @@ const PublicKey = function (x, isOdd) {
* @return {!PublicKey}
*/
PublicKey.fromBase58 = (addr) => {
/** @const {!Uint8Array} */
const bytes = base58.toBytes(addr);
return new PublicKey(uint8ArrayLEtoBigInt(bytes.subarray(3, 35)), !!bytes[35]);
}
Expand All @@ -68,6 +66,7 @@ PublicKey.fromBase58 = (addr) => {
* @return {string}
*/
PublicKey.prototype.toBase58 = function () {
/** @const {!Uint8Array} */
const buff = new Uint8Array(40);
buff[0] = 203;
buff[1] = buff[2] = 1;
Expand Down Expand Up @@ -113,6 +112,7 @@ function Signature(r, s) {
}

Signature.fromBase58 = function (sig) {
/** @const {!Uint8Array} */
const bytes = base58.toBytes(sig);
return new Signature(
uint8ArrayLEtoBigInt(bytes.subarray(2, 34)),
Expand All @@ -121,6 +121,7 @@ Signature.fromBase58 = function (sig) {
}

Signature.prototype.toBase58 = function () {
/** @const {!Uint8Array} */
const buff = new Uint8Array(70);
buff[0] = 154;
buff[1] = 1;
Expand Down
1 change: 0 additions & 1 deletion mina/o1js
Submodule o1js deleted from 028b65
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"@ethereumjs/evm": "^3.1.0",
"@noble/secp256k1": "^2.0.0",
"ethers": "^6.13.2",
"mina-signer": "^3.0.7",
"o1js": "^1.6.0"
"mina-signer": "^3.0.7"
},
"dependencies": {
"acorn": "^8.12.1",
Expand Down

0 comments on commit a6df1b7

Please sign in to comment.