///
import { BaseCoin, BitGoBase, Eddsa, ExplanationResult, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, UnsignedTransaction, VerifyAddressOptions, VerifyTransactionOptions } from '@bitgo-beta/sdk-core';
import { BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
import { Interface } from './lib';
import { ApiPromise } from '@polkadot/api';
import { Material } from './lib/iface';
export interface SignTransactionOptions extends BaseSignTransactionOptions {
txPrebuild: TransactionPrebuild;
prv: string;
}
export interface TransactionPrebuild {
txHex: string;
transaction: Interface.TxData;
}
export interface ExplainTransactionOptions {
txPrebuild: TransactionPrebuild;
publicKey: string;
feeInfo: {
fee: string;
};
}
export interface VerifiedTransactionParameters {
txHex: string;
prv: string;
}
interface RecoveryOptions {
userKey?: string;
backupKey?: string;
bitgoKey: string;
recoveryDestination: string;
krsProvider?: string;
walletPassphrase?: string;
}
interface DotTx {
serializedTx: string;
}
export declare class Dot extends BaseCoin {
protected readonly _staticsCoin: Readonly;
readonly MAX_VALIDITY_DURATION = 2400;
readonly SWEEP_TXN_DURATION = 64;
constructor(bitgo: BitGoBase, staticsCoin?: Readonly);
protected static initialized: boolean;
protected static MPC: Eddsa;
protected static nodeApiInitialized: boolean;
protected static API: ApiPromise;
static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly): BaseCoin;
getChain(): string;
getBaseChain(): string;
getFamily(): string;
getFullName(): string;
supportsStaking(): boolean;
getBaseFactor(): number;
/**
* Flag for sending value of 0
* @returns {boolean} True if okay to send 0 value, false otherwise
*/
valuelessTransferAllowed(): boolean;
/** @inheritDoc */
supportsTss(): boolean;
getMPCAlgorithm(): MPCAlgorithm;
allowsAccountConsolidations(): boolean;
/**
* Generate ed25519 key pair
*
* @param seed
* @returns {Object} object with generated pub, prv
*/
generateKeyPair(seed?: Buffer): KeyPair;
/**
* Return boolean indicating whether input is valid public key for the coin.
*
* @param {String} pub the pub to be checked
* @returns {Boolean} is it valid?
*/
isValidPub(pub: string): boolean;
/**
* Return boolean indicating whether the supplied private key is a valid dot private key
*
* @param {String} prv the prv to be checked
* @returns {Boolean} is it valid?
*/
isValidPrv(prv: string): boolean;
/**
* Return boolean indicating whether input is valid public key for the coin
*
* @param {String} address the pub to be checked
* @returns {Boolean} is it valid?
*/
isValidAddress(address: string): boolean;
/**
* Sign message with private key
*
* @param key
* @param message
* @return {Buffer} A signature over the given message using the given key
*/
signMessage(key: KeyPair, message: string | Buffer): Promise;
/**
* Explain/parse transaction
* @param unsignedTransaction
*/
explainTransaction(unsignedTransaction: UnsignedTransaction): Promise;
verifySignTransactionParams(params: SignTransactionOptions): VerifiedTransactionParameters;
/**
* Assemble keychain and half-sign prebuilt transaction
*
* @param params
* @param params.txPrebuild {TransactionPrebuild} prebuild object returned by platform
* @param params.prv {String} user prv
* @returns {Promise}
*/
signTransaction(params: SignTransactionOptions): Promise;
protected getInitializedNodeAPI(): Promise;
protected getAccountInfo(walletAddr: string): Promise<{
nonce: number;
freeBalance: number;
}>;
protected getHeaderInfo(): Promise<{
headerNumber: number;
headerHash: string;
}>;
/**
*
* Estimate the fee of the transaction
*
* @param {string} destAddr destination wallet address
* @param {string} srcAddr source wallet address
* @param {string} amount amount to transfer
* @returns {number} the estimated fee the transaction will cost
*
* @see https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-estimate-the-transaction-fees
*/
protected getFee(destAddr: string, srcAddr: string, amount: number): Promise;
protected getMaterial(): Promise;
/**
* Builds a funds recovery transaction without BitGo
* @param params
*/
recover(params: RecoveryOptions): Promise;
parseTransaction(params: ParseTransactionOptions): Promise;
isWalletAddress(params: VerifyAddressOptions): boolean;
verifyTransaction(params: VerifyTransactionOptions): Promise;
getAddressFromPublicKey(Pubkey: string): string;
private getBuilder;
}
export {};
//# sourceMappingURL=dot.d.ts.map