diff --git a/packages/contracts/mina-delegation/package.json b/packages/contracts/mina-delegation/package.json index 43d83e7b..c4480074 100644 --- a/packages/contracts/mina-delegation/package.json +++ b/packages/contracts/mina-delegation/package.json @@ -28,7 +28,7 @@ "o1js" ], "dependencies": { - "o1js": "^1.4.0" + "o1js": "^1.5.0" }, "devDependencies": { "eslint-plugin-o1js": "^0.4.0", diff --git a/packages/contracts/mina-delegation/src/delegate.ts b/packages/contracts/mina-delegation/src/delegate.ts index de1ea280..96006b2c 100644 --- a/packages/contracts/mina-delegation/src/delegate.ts +++ b/packages/contracts/mina-delegation/src/delegate.ts @@ -7,15 +7,15 @@ import { Struct, UInt8, ZkProgram, - createEcdsa, - createForeignCurve, + createEcdsaV2, + createForeignCurveV2, } from 'o1js'; // ---------------------------------------------------------------------------- // Common data types /** A Mina foreign curve for Secp256k1, like Ethereum uses. */ -export class Secp256k1 extends createForeignCurve(Crypto.CurveParams.Secp256k1) { +export class Secp256k1 extends createForeignCurveV2(Crypto.CurveParams.Secp256k1) { /** Convert a standard hex public key into this provable struct. */ static fromHex(publicKey: `0x${string}`): Secp256k1 { if (publicKey.startsWith('0x04') && publicKey.length === 4 + 64 + 64) { @@ -35,7 +35,7 @@ export class Secp256k1 extends createForeignCurve(Crypto.CurveParams.Secp256k1) } /** A Mina-provable ECDSA signature on the Secp256k1 curve, like Ethereum uses. */ -export class Ecdsa extends createEcdsa(Secp256k1) { +export class Ecdsa extends createEcdsaV2(Secp256k1) { // o1js-provided fromHex is good enough }