UNPKG

@cowprotocol/cow-sdk

Version:

<p align="center"> <img width="400" src="https://github.com/cowprotocol/cow-sdk/raw/main/docs/images/CoW.png" /> </p>

36 lines (35 loc) 1.42 kB
import { EcdsaSigningScheme } from '@cowprotocol/contracts'; import type { Signer } from '@ethersproject/abstract-signer'; import { TypedDataDomain } from 'ethers'; import { SupportedChainId } from '../common'; import { ICoWShedCall, ICoWShedOptions } from './types'; export declare class CowShedHooks { private chainId; private customOptions?; constructor(chainId: SupportedChainId, customOptions?: ICoWShedOptions | undefined); proxyOf(user: string): string; encodeExecuteHooksForFactory(calls: ICoWShedCall[], nonce: string, deadline: bigint, user: string, signature: string): string; signCalls(calls: ICoWShedCall[], nonce: string, deadline: bigint, signer: Signer, signingScheme: EcdsaSigningScheme): Promise<string>; infoToSign(calls: ICoWShedCall[], nonce: string, deadline: bigint, proxy: string): { domain: TypedDataDomain; types: { ExecuteHooks: { type: string; name: string; }[]; Call: { type: string; name: string; }[]; }; message: { calls: ICoWShedCall[]; nonce: string; deadline: bigint; }; }; getDomain(proxy: string): TypedDataDomain; proxyCreationCode(): string; getFactoryAddress(): string; getImplementationAddress(): string; }