UNPKG

@bananahq/banana-sdk

Version:

Smart contract wallet sdk package by Banana Wallet

22 lines (21 loc) 1.34 kB
import { ethers } from 'ethers'; import { BytesLike } from '@ethersproject/bytes'; import { JsonRpcProvider } from '@ethersproject/providers'; import { TypedDataDomain, TypedDataField, TypedDataSigner, Signer as EthersSigner } from '@ethersproject/abstract-signer'; import { Deferrable } from 'ethers/lib/utils'; import { TransactionRequest } from '@ethersproject/providers'; import { ChainId } from './interfaces/Banana.interface'; export declare class BananaCustomSigner extends EthersSigner implements TypedDataSigner { readonly provider: JsonRpcProvider; readonly defaultChainId: number | undefined; constructor(provider: JsonRpcProvider, defaultChainId?: number); _address: string; getAddress(): Promise<string>; getChainId(): Promise<number>; signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>; signMessage(message: BytesLike): Promise<string>; signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, message: Record<string, any>, chainId?: ChainId): Promise<string>; _signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, message: Record<string, any>, chainId?: ChainId): Promise<string>; connectUnchecked(): ethers.providers.JsonRpcSigner; connect(_provider: JsonRpcProvider): BananaCustomSigner; }