Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-TuanHoang committed Sep 20, 2024
1 parent 7d10fe6 commit 2f43990
Show file tree
Hide file tree
Showing 17 changed files with 350 additions and 481 deletions.
12 changes: 5 additions & 7 deletions build/src/Bridge.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { PublicKey, SmartContract, State, UInt64, Bool, DeployArgs, Field } from 'o1js';
import { Secp256k1, Ecdsa, Bytes32, Bytes256 } from './ecdsa/ecdsa.js';
import { PublicKey, SmartContract, State, UInt64, Bool, DeployArgs, Field, Signature } from 'o1js';
declare const UnlockEvent_base: (new (value: {
receiver: PublicKey;
tokenAddress: PublicKey;
Expand Down Expand Up @@ -209,10 +208,9 @@ export declare class Bridge extends SmartContract {
changeManager(newManager: PublicKey): Promise<void>;
changeValidatorManager(validatorManager: PublicKey): Promise<void>;
lock(amount: UInt64, address: Field, tokenAddr: PublicKey): Promise<void>;
unlock(amount: UInt64, receiver: PublicKey, id: UInt64, tokenAddr: PublicKey, useSig1: Bool, signature_1: Ecdsa, validator_1: Secp256k1, useSig2: Bool, signature_2: Ecdsa, validator_2: Secp256k1, useSig3: Bool, signature_3: Ecdsa, validator_3: Secp256k1): Promise<void>;
isValidator(validator: Secp256k1, useSig: Bool): Bool;
validateValidator(useSig1: Bool, validator_1: Secp256k1, useSig2: Bool, validator_2: Secp256k1, useSig3: Bool, validator_3: Secp256k1): void;
validateSig(msg: Bytes256, signature: Ecdsa, validator: Secp256k1, useSig: Bool): Promise<void>;
validateMsg(message: Bytes32, signature: Ecdsa, publicKey: Secp256k1): Promise<Bool>;
unlock(amount: UInt64, receiver: PublicKey, id: UInt64, tokenAddr: PublicKey, useSig1: Bool, validator1: PublicKey, sig1: Signature, useSig2: Bool, validator2: PublicKey, sig2: Signature, useSig3: Bool, validator3: PublicKey, sig3: Signature): Promise<void>;
validateValidator(useSig1: Bool, validator1: PublicKey, useSig2: Bool, validator2: PublicKey, useSig3: Bool, validator3: PublicKey): Promise<void>;
validateSig(msg: Field[], signature: Signature, validator: PublicKey, useSig: Bool): Promise<void>;
verifyMsg(publicKey: PublicKey, msg: Field[], sig: Signature): Promise<void>;
}
export {};
107 changes: 43 additions & 64 deletions build/src/Bridge.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f43990

Please sign in to comment.