UNPKG

@sybil-center/zkc-o1js

Version:

Work with sybil-center ZKC & MINA protocol

49 lines (48 loc) 1.27 kB
import { SybilID, SybilWalletProof, WalletProvider } from "@sybil-center/zkc-core"; interface SignMessageArgs { message: string; } interface SignedData { publicKey: string; data: string; signature: { field: string; scalar: string; }; } interface VerifyMessageArgs { publicKey: string; payload: string; signature: { field: string; scalar: string; }; } type SendTransactionArgs = { transaction: any; feePayer?: { fee?: number; memo?: string; }; }; export interface IAuroWallet { requestAccounts(): Promise<string[]>; requestNetwork(): Promise<"Mainnet" | "Devnet" | "Berkeley" | "Unknown">; getAccounts(): Promise<string[]>; signMessage(args: SignMessageArgs): Promise<SignedData>; verifyMessage(args: VerifyMessageArgs): Promise<boolean>; sendTransaction(args: SendTransactionArgs): Promise<{ hash: string; }>; } export declare class AuroProvider implements WalletProvider { private readonly provider; constructor(provider: IAuroWallet); getAddress(): Promise<string>; getSubjectId(): Promise<SybilID>; sign(args: { message: string; }): Promise<string>; getProof(): Promise<SybilWalletProof>; } export {};