PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-coin-icp/dist/src

Просмотр файла: icp.d.ts

import { AuditDecryptedKeyParams, BaseBroadcastTransactionOptions, BaseBroadcastTransactionResult, BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, MultisigType, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions, TssVerifyAddressOptions, VerifyTransactionOptions } from '@bitgo/sdk-core';
import { BaseCoin as StaticsBaseCoin } from '@bitgo/statics';
import BigNumber from 'bignumber.js';
import { Hash } from 'crypto';
import { PayloadsData, RecoveryOptions, RecoveryTransaction, Signatures, IcpTransactionExplanation, TransactionHexParams, UnsignedSweepRecoveryTransaction } from './lib/iface';
/**
 * Class representing the Internet Computer (ICP) coin.
 * Extends the BaseCoin class and provides specific implementations for ICP.
 *
 * @see {@link https://internetcomputer.org/}
 * @see {@link https://internetcomputer.org/docs/current/developer-docs/defi/rosetta/icp_rosetta/data_api/}
 */
export declare class Icp extends BaseCoin {
    protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
    protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
    static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin;
    getChain(): string;
    getBaseChain(): string;
    getFamily(): string;
    getFullName(): string;
    getBaseFactor(): number;
    explainTransaction(params: TransactionHexParams): Promise<IcpTransactionExplanation>;
    verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
    isWalletAddress(params: TssVerifyAddressOptions): Promise<boolean>;
    parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
    /**
     * Generate a new keypair for this coin.
     * @param seed Seed from which the new keypair should be generated, otherwise a random seed is used
     */
    generateKeyPair(seed?: Buffer): KeyPair;
    isValidAddress(address: string): boolean;
    signTransaction(params: SignTransactionOptions & {
        txPrebuild: {
            txHex: string;
        };
        prv: string;
    }): Promise<SignedTransaction>;
    isValidPub(key: string): boolean;
    isValidPrv(key: string): boolean;
    /** @inheritDoc */
    supportsTss(): boolean;
    /** inherited doc */
    getDefaultMultisigType(): MultisigType;
    /** @inheritDoc */
    getMPCAlgorithm(): MPCAlgorithm;
    /** @inheritDoc **/
    getHashFunction(): Hash;
    private getAddressFromPublicKey;
    /** @inheritDoc **/
    protected getPublicNodeUrl(): string;
    /** @inheritDoc **/
    broadcastTransaction(payload: BaseBroadcastTransactionOptions): Promise<BaseBroadcastTransactionResult>;
    private getPublicNodeBroadcastEndpoint;
    /**
     * Fetches the account balance for a given public key.
     * @param publicKeyHex - Hex-encoded public key of the account.
     * @returns Promise resolving to the account balance as a string.
     * @throws Error if the balance could not be fetched.
     */
    protected getAccountBalance(publicKeyHex: string): Promise<BigNumber>;
    /**
     * Retrieves the current transaction fee data from the ICP public node.
     *
     * This method creates an instance of `IcpAgent` using the public node URL,
     * then queries the node for the current fee information.
     *
     * @returns A promise that resolves to a `BigNumber` representing the current transaction fee.
     * @throws Will propagate any errors encountered while communicating with the ICP node.
     */
    protected getFeeData(): Promise<BigNumber>;
    private getBuilderFactory;
    /**
     * Generates an array of signatures for the provided payloads using MPC
     *
     * @param payloadsData - The data containing the payloads to be signed.
     * @param senderPublicKey - The public key of the sender in hexadecimal format.
     * @param userKeyShare - The user's key share as a Buffer.
     * @param backupKeyShare - The backup key share as a Buffer.
     * @param commonKeyChain - The common key chain identifier used for MPC signing.
     * @returns A promise that resolves to an array of `Signatures` objects, each containing the signing payload,
     *          signature type, public key, and the generated signature in hexadecimal format.
     */
    signatures(payloadsData: PayloadsData, senderPublicKey: string, userKeyShare: Buffer<ArrayBufferLike>, backupKeyShare: Buffer<ArrayBufferLike>, commonKeyChain: string): Promise<Signatures[]>;
    /**
     * Builds a funds recovery transaction without BitGo
     * @param params
     */
    recover(params: RecoveryOptions): Promise<RecoveryTransaction | UnsignedSweepRecoveryTransaction>;
    /** @inheritDoc */
    auditDecryptedKey({ multiSigType, prv, publicKey }: AuditDecryptedKeyParams): void;
}
//# sourceMappingURL=icp.d.ts.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!