import type { TypedDataDomain, TypedDataField, TypedDataSigner } from '@ethersproject/abstract-signer'; import { Signer } from '@ethersproject/abstract-signer'; import type { JsonRpcProvider, TransactionRequest, TransactionResponse } from '@ethersproject/providers'; import type { UnsignedTransaction } from 'ethers/lib/utils'; import type { Deferrable } from '@ethersproject/properties'; import type { Bytes } from '@ethersproject/bytes'; import type { FireblocksSDK } from 'fireblocks-defi-sdk'; import { Chain } from 'fireblocks-defi-sdk'; import { EthersCustomBridge } from './from-upstream/fireblocks-bridge'; export declare class FireblocksSigner extends Signer implements TypedDataSigner { readonly fireblocksApiClient: FireblocksSDK; readonly chain: Chain; readonly vaultAccountId: string; readonly _bridge: EthersCustomBridge; memo: string; constructor(fireblocksApiClient: FireblocksSDK, chain: Chain, provider: JsonRpcProvider, vaultAccountId?: string); static _transactionRequestToUnsignedTransaction(tx: Deferrable): Promise; getAddress(): Promise; setNextTransactionMemo(memo: string): void; signMessage(message: Bytes | string): Promise; /** * _signMessage: Internal implementation of raw message signing. * * There isn't a transaction hash returned in the in raw signing result * but the `waitForTxHash` call does tell us when the request status has * completed approval and signing in fireblocks. * * @param message - the message to sign * @returns Message signature. */ _signMessage(message: Bytes): Promise; /** * _populateTransaction - Internal wrapper around ethers populateTransaction function. * * Figures out gas pricing and limits. * * Ideally this would lean more heavily on the JsonRPCProvider but for the moment there * is a hardcoded setting of 25 gwei internally which fails on mumbai / polygon now. * * @param transaction * @param type * @returns */ _populateTransaction(transaction: Deferrable): Promise; _signTransaction(transaction: UnsignedTransaction): Promise; /** * _signRawTransaction: Internal implementation of raw transaction signing. * * There isn't a transaction hash returned in the in raw signing result * but the `waitForTxHash` call does tell us when the request status has * completed approval and signing in fireblocks. * * @param message - the message to sign * @returns Message signature. */ _signRawTransaction(transaction: UnsignedTransaction): Promise; signTransaction(transaction: Deferrable): Promise; sendTransaction(transaction: Deferrable): Promise; /** * Implements typed signing following the ethers TypedDataSigner interface. * * Ethers 6.x will rename this to signTypedData and fold TypedDataSigner * into the standard Signer interface. * * Based on jsonrpc signer implementation: https://github.com/ethers-io/ethers.js/blob/master/packages/providers/src.ts/json-rpc-provider.ts#L334 * See also https://support.fireblocks.io/hc/en-us/articles/4413379762450-Off-Chain-Message-Signing#h_01FE9VKBH6SG9EFT9G097ZV3ET * * @param domain * @param types * @param value * @returns Signature string */ _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; connect(provider: JsonRpcProvider): FireblocksSigner; }