import { Provider } from '../provider'; import { AddTransactionResponse, KeyPair, Signature, Transaction } from '../types'; import { TypedData } from '../utils/typedData'; import { SignerInterface } from './interface'; export declare class Signer extends Provider implements SignerInterface { address: string; private keyPair; constructor(provider: Provider, address: string, keyPair: KeyPair); /** * Invoke a function on the starknet contract * * [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/gateway/gateway_client.py#L13-L17) * * @param transaction - transaction to be invoked * @returns a confirmation of invoking a function on the starknet contract */ addTransaction(transaction: Transaction): Promise; /** * Sign an JSON object with the starknet private key and return the signature * * @param json - JSON object to be signed * @returns the signature of the JSON object * @throws {Error} if the JSON object is not a valid JSON */ signMessage(typedData: TypedData): Promise; /** * Hash a JSON object with pederson hash and return the hash * * @param json - JSON object to be hashed * @returns the hash of the JSON object * @throws {Error} if the JSON object is not a valid JSON */ hashMessage(typedData: TypedData): Promise; }