///
import { AptosClient } from "aptos";
import type { Signer } from "arbundles";
import { InjectedAptosSigner } from "arbundles/web";
import BigNumber from "bignumber.js";
import type { CurrencyConfig, Tx } from "../../common/types";
import BaseWebCurrency from "../currency";
export interface SignMessagePayload {
address?: boolean;
application?: boolean;
chainId?: boolean;
message: string;
nonce: string;
}
export interface SignMessageResponse {
address: string;
application: string;
chainId: number;
fullMessage: string;
message: string;
nonce: string;
prefix: string;
signature: string;
}
export interface AptosWallet {
account: () => Promise<{
address: string;
publicKey: string;
}>;
connect: () => Promise<{
address: string;
publicKey: string;
}>;
disconnect: () => Promise;
isConnected: () => Promise;
network: () => Promise<"Testnet" | "Mainnet">;
signAndSubmitTransaction: (transaction: any) => Promise;
signMessage: (payload: SignMessagePayload) => Promise;
signTransaction: (transaction: any) => Promise;
}
export default class AptosConfig extends BaseWebCurrency {
protected providerInstance?: AptosClient;
protected signerInstance: InjectedAptosSigner;
protected wallet: AptosWallet;
protected _publicKey: Buffer;
constructor(config: CurrencyConfig);
getProvider(): Promise;
getTx(txId: string): Promise;
ownerToAddress(owner: any): string;
sign(data: Uint8Array): Promise;
getSigner(): Signer;
verify(pub: any, data: Uint8Array, signature: Uint8Array): Promise;
getCurrentHeight(): Promise;
getFee(amount: BigNumber.Value, to?: string): Promise<{
gasUnitPrice: number;
maxGasAmount: number;
}>;
sendTx(data: any): Promise;
createTx(amount: BigNumber.Value, to: string, _fee?: string): Promise<{
txId: string | undefined;
tx: any;
}>;
getPublicKey(): Promise;
ready(): Promise;
}