PHP WebShell
Текущая директория: /opt/BitGoJS/modules/abstract-substrate/dist/src
Просмотр файла: abstractSubstrateCoin.d.ts
import { BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, MPCConsolidationRecoveryOptions, MPCRecoveryOptions, MPCSweepRecoveryOptions, MPCSweepTxs, MPCTx, MPCTxs, MultisigType, ParsedTransaction, ParseTransactionOptions, SignedTransaction, VerifyAddressOptions, VerifyTransactionOptions } from '@bitgo/sdk-core';
import { CoinFamily, BaseCoin as StaticsBaseCoin } from '@bitgo/statics';
import { SignTransactionOptions, VerifiedTransactionParameters, Material } from './lib/iface';
import { ApiPromise } from '@polkadot/api';
export declare const DEFAULT_SCAN_FACTOR = 20;
export declare class SubstrateCoin extends BaseCoin {
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
readonly MAX_VALIDITY_DURATION = 2400;
readonly SWEEP_TXN_DURATION = 64;
protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
/**
* Creates an instance of TransactionBuilderFactory for the coin specific sdk
*/
getBuilder(): any;
/** @inheritDoc **/
getBaseFactor(): string | number;
/** @inheritDoc **/
getChain(): string;
/** @inheritDoc **/
getFamily(): CoinFamily;
/** @inheritDoc **/
getFullName(): string;
/** @inheritDoc */
supportsTss(): boolean;
/** inherited doc */
getDefaultMultisigType(): MultisigType;
/** @inheritDoc **/
getMPCAlgorithm(): MPCAlgorithm;
/** @inheritDoc **/
generateKeyPair(seed?: Buffer): KeyPair;
/** @inheritDoc **/
isValidPub(pub: string): boolean;
/** @inheritDoc **/
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
/** @inheritDoc **/
parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
/** @inheritDoc **/
verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
/** @inheritDoc **/
isValidAddress(address: string): boolean;
verifySignTransactionParams(params: SignTransactionOptions): VerifiedTransactionParameters;
/** @inheritDoc **/
signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
/**
* Retrieves the address format for the substrate coin.
*
* @returns {number} The address format as a number.
*/
protected getAddressFormat(): number;
/**
* Retrieves the maximum validity duration in blocks.
*
* This method is intended to be overridden by subclasses to provide the specific
* maximum validity duration for different types of Substrate-based coins.
*
* @returns {number} The maximum validity duration in blocks.
* @throws {Error} If the method is not implemented by the subclass.
*/
protected getMaxValidityDurationBlocks(): number;
protected getAddressFromPublicKey(Pubkey: string): string;
protected getInitializedNodeAPI(): Promise<ApiPromise>;
protected getAccountInfo(walletAddr: string): Promise<{
nonce: number;
freeBalance: number;
}>;
protected getFee(destAddr: string, srcAddr: string, amount: number): Promise<number>;
protected getHeaderInfo(): Promise<{
headerNumber: number;
headerHash: string;
}>;
protected getMaterial(): Promise<Material>;
/**
* Builds a funds recovery transaction without BitGo
* @param {MPCRecoveryOptions} params parameters needed to construct and
* (maybe) sign the transaction
*
* @returns {MPCTx} the serialized transaction hex string and index
* of the address being swept
*/
recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
/**
* Builds native TAO recoveries of receive addresses in batch without BitGo.
* Funds will be recovered to base address first. You need to initiate another sweep txn after that.
*
* @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
* @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
* @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
*/
recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
/** inherited doc */
createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
}
//# sourceMappingURL=abstractSubstrateCoin.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!