import { BigNumber, Signer, providers, utils } from 'ethers'; /** * Context needed to issue a signed read against a Seismic chain. */ export interface SeismicSignerContext { chainId: number; /** Explicit RPC for signers without a connected JSON-RPC-capable provider. */ rpcUrl: string; name: string; } /** * Wraps an ethers Signer for Seismic chains. * * On Seismic, unsigned `eth_call`/`eth_estimateGas` zero out the `from` field * (msg.sender = 0x0) to protect access-controlled shielded state. Gas estimation * for owner-gated calls therefore reverts with "Ownable: caller is not the * owner". Seismic's `eth_estimateGas` instead accepts a *signed* raw transaction * and recovers `msg.sender` from the signature (a "signed read"). * * Signed reads require Seismic encryption metadata and a replay-protected * signature. The official client handles encryption and EIP-712 encoding; * signing delegates to the wrapped signer without exporting its private key. * * Writes are plain transparent transactions that already work on Seismic, so * `sendTransaction` delegates to the wrapped signer. It first fills in a * missing `gasLimit` with the signed-read estimate: otherwise the inner * signer's `populateTransaction` would run an unsigned `eth_estimateGas`, * which Seismic executes with `msg.sender = 0x0` and therefore reverts for * every owner-gated call (`setDefaultHook`, `transferOwnership`, ...). * * `signedCall` is the matching signed `eth_call`, for reads whose result * depends on `msg.sender`: shielded tokens only reveal `balanceOf`/`allowance` * to the account itself, so the SDK's pre-transfer balance checks need it. It * is deliberately not an override of `Signer.call`: ethers routes every view * call of a signer-connected Contract through `call`, and turning all of those * into encrypted multi-round-trip signed reads is neither needed nor cheap. */ export declare class SeismicSigner extends Signer { readonly inner: Signer; private readonly context; readonly provider?: providers.Provider; private cachedClient?; constructor(inner: Signer, context: SeismicSignerContext); static is(signer: Signer): signer is SeismicSigner; getAddress(): Promise; signMessage(message: string | utils.Bytes): Promise; signTransaction(tx: utils.Deferrable): Promise; sendTransaction(tx: utils.Deferrable): Promise; connect(provider: providers.Provider): SeismicSigner; /** * Signed-read gas estimation. Sends an encrypted EIP-712 signed read to * Seismic's `eth_estimateGas` so it recovers the real `msg.sender`. Fees are * zeroed so estimation isn't gated on the signer's balance (it only needs the * execution-gas estimate; the actual send uses normal fees). */ estimateGas(tx: utils.Deferrable): Promise; /** * Signed read. Sends an encrypted EIP-712 signed read to Seismic's * `eth_call` so the node executes it with the real `msg.sender`, and * decrypts the response (and any revert data) with the request's key. * Returns the plaintext ABI-encoded return data. Unlike `call`, which stays * the inherited unsigned read, callers opt in explicitly. Always reads at * `latest`: the request's nonce and replay window are taken from the * current chain head, so it cannot meaningfully target another block. */ signedCall(tx: utils.Deferrable): Promise; /** * Builds the encrypted, EIP-712-signed Seismic request shared by signed * estimates and signed reads. Fees are zeroed so the request isn't gated on * the signer's balance; gas is the block gas limit. */ private prepareSignedRequest; /** Reuses client setup, never the per-request nonce, block or signature. */ private getClient; private createClient; private throwReadError; } //# sourceMappingURL=SeismicSigner.d.ts.map