UNPKG

@pgchain/blockchain-libs

Version:
33 lines (32 loc) 1.66 kB
import { AddressValidation, SignedTx, TypedMessage, UnsignedTx } from '../../../types/provider'; import { Signer, Verifier } from '../../../types/secret'; import { BaseProvider } from '../../abc'; import { Conflux } from './conflux'; declare class Provider extends BaseProvider { get conflux(): Promise<Conflux>; private internalPubkeyToAddress; verifyAddress(address: string): Promise<AddressValidation>; pubkeyToAddress(verifier: Verifier, encoding?: string | undefined): Promise<string>; /** * transform the eth address to cfx format address * @param address the eth format address {string} * @returns the cfx format address {string} */ private ethAddressToCfxAddress; buildUnsignedTx(unsignedTx: UnsignedTx): Promise<UnsignedTx>; signTransaction(unsignedTx: UnsignedTx, signers: { [address: string]: Signer; }): Promise<SignedTx>; private buildCFXUnSignedTx; hardwareGetXpubs(paths: string[], showOnDevice: boolean): Promise<{ path: string; xpub: string; }[]>; hardwareGetAddress(path: string, showOnDevice: boolean, addressToVerify?: string): Promise<string>; hardwareSignTransaction(unsignedTx: UnsignedTx, signers: Record<string, string>): Promise<SignedTx>; hardwareSignMessage(message: TypedMessage, signer: string): Promise<string>; hardwareVerifyMessage(address: string, message: TypedMessage, signature: string): Promise<boolean>; signMessage(message: TypedMessage, signer: Signer, address?: string): Promise<string>; verifyMessage(address: string, message: TypedMessage, signature: string): Promise<boolean>; } export { Provider };