PHP WebShell
Текущая директория: /opt/BitGoJS/modules/sdk-coin-ada/dist/src
Просмотр файла: ada.d.ts
import { BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions as BaseParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, TransactionExplanation, VerifyAddressOptions, VerifyTransactionOptions, MPCTx, MPCRecoveryOptions, MPCConsolidationRecoveryOptions, MPCSweepTxs, MPCSweepRecoveryOptions, MPCTxs, PopulatedIntent, PrebuildTransactionWithIntentOptions, MultisigType } from '@bitgo/sdk-core';
import { BaseCoin as StaticsBaseCoin, CoinFamily } from '@bitgo/statics';
import * as request from 'superagent';
export declare const DEFAULT_SCAN_FACTOR = 20;
export interface TransactionPrebuild {
txHex: string;
}
export interface ExplainTransactionOptions {
txPrebuild: TransactionPrebuild;
}
export interface AdaParseTransactionOptions extends BaseParseTransactionOptions {
txPrebuild: TransactionPrebuild;
}
export interface SignTransactionOptions extends BaseSignTransactionOptions {
txPrebuild: TransactionPrebuild;
prv: string;
}
interface AdaAddressParams {
bitgoKey: string;
index: number;
seed?: string;
}
interface AdaAddressAndAccountId {
address: string;
accountId: string;
}
export type AdaTransactionExplanation = TransactionExplanation;
export declare class Ada extends BaseCoin {
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin;
/**
* Factor between the coin's base unit and its smallest subdivison
*/
getBaseFactor(): number;
getChain(): string;
getFamily(): CoinFamily;
getFullName(): string;
getBaseChain(): string;
/**
* Verify that a transaction prebuild complies with the original intention
* A prebuild transaction has to be parsed correctly and intended recipients has to be
* in the transaction output
*
* @param params.txPrebuild prebuild transaction
* @param params.txParams transaction parameters
* @return true if verification success
*
*/
verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
/** @inheritDoc */
signMessage(key: KeyPair, message: string | Buffer): Promise<Buffer>;
/**
* Explain/parse transaction
* @param params
*/
explainTransaction(params: ExplainTransactionOptions): Promise<AdaTransactionExplanation>;
parseTransaction(params: AdaParseTransactionOptions): Promise<ParsedTransaction>;
generateKeyPair(seed?: Buffer): KeyPair;
isValidPub(pub: string): boolean;
isValidPrv(prv: string): boolean;
isValidAddress(address: string): boolean;
signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
protected getPublicNodeUrl(): string;
protected getDataFromNode(endpoint: string, requestBody?: Record<string, unknown>): Promise<request.Response>;
protected getAddressInfo(walletAddr: string): Promise<{
balance: number;
utxoSet: Array<Record<string, any>>;
}>;
protected getChainTipInfo(): Promise<Record<string, string>>;
/** inherited doc */
createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
/**
* Builds funds recovery transaction(s) without BitGo
*
* @param {MPCRecoveryOptions} params parameters needed to construct and
* (maybe) sign the transaction
*
* @returns {MPCTx | MPCSweepTxs} array of the serialized transaction hex strings and indices
* of the addresses being swept
*/
recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
/**
* Builds native ADA 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>;
/**
* Obtains ADA address and account id from provided bitgo key for the given index and seed (optional).
*
* @param {AdaAddressParams} params - params to obtain ada address and account id
*/
getAdaAddressAndAccountId(params: AdaAddressParams): Promise<AdaAddressAndAccountId>;
/** inherited doc */
supportsTss(): boolean;
/** inherited doc */
getDefaultMultisigType(): MultisigType;
/** inherited doc */
getMPCAlgorithm(): MPCAlgorithm;
/** inherited doc */
allowsAccountConsolidations(): boolean;
private getBuilder;
/** inherited doc */
setCoinSpecificFieldsInIntent(intent: PopulatedIntent, params: PrebuildTransactionWithIntentOptions): void;
}
export {};
//# sourceMappingURL=ada.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!