rango-types
Version:
Rango Exchange Types
23 lines • 1.05 kB
TypeScript
import { Transaction, TransactionType } from '../api/main/index.js';
export interface GenericSigner<Tx extends Transaction> {
signMessage(msg: string, address: string, chainId: string | null): Promise<string>;
signAndSendTx(tx: Tx, address: string, chainId: string | null): Promise<{
hash: string;
response?: any;
}>;
wait?(txHash: string, chainId?: string, txResponse?: any, confirmations?: number): Promise<{
hash: string;
response?: any;
}>;
}
export interface SignerFactory {
registerSigner<Tx extends Transaction>(txType: TransactionType, signer: GenericSigner<Tx>): void;
getSigner<Tx extends Transaction>(txType: TransactionType): GenericSigner<Tx>;
}
export declare class DefaultSignerFactory implements SignerFactory {
private signers;
constructor();
registerSigner<Tx extends Transaction>(txType: TransactionType, signer: GenericSigner<Tx>): void;
getSigner<Tx extends Transaction>(txType: TransactionType): GenericSigner<Tx>;
}
//# sourceMappingURL=signer.d.ts.map