PHP WebShell

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

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

import { TransactionVersion } from '@stacks/transactions';
import { DefaultKeys, KeyPairOptions, Secp256k1ExtendedKeyPair } from '@bitgo/sdk-core';
export declare class KeyPair extends Secp256k1ExtendedKeyPair {
    /**
     * Public constructor. By default, creates a key pair with a random master seed.
     *
     * @param { KeyPairOptions } source Either a master seed, a private key, or a public key
     */
    constructor(source?: KeyPairOptions);
    /**
     * Build a keypair from a protocol private key or extended private key.
     *
     * The protocol private key is either 32 or 33 bytes long (64 or 66
     * characters hex).  If it is 32 bytes long, set the keypair's "compressed"
     * field to false to later generate uncompressed public keys (the default).
     * A 33 byte key has 0x01 as the last byte.
     *
     * @param {string} prv A raw private key
     */
    recordKeysFromPrivateKey(prv: string): void;
    /**
     * Build an ECPair from a protocol public key or extended public key.
     *
     * The protocol public key is either 32 bytes or 64 bytes long, with a
     * one-byte prefix (a total of 66 or 130 characters in hex).  If the
     * prefix is 0x02 or 0x03, it is a compressed public key.  A prefix of 0x04
     * denotes an uncompressed public key.
     *
     * @param {string} pub A raw public key
     */
    recordKeysFromPublicKey(pub: string): void;
    /**
     * Stacks default keys format is raw private and uncompressed public key
     *
     * @param {boolean} compressed - Compress public key (defaults to false)
     * @returns {DefaultKeys} The keys in the protocol default key format
     */
    getKeys(compressed?: boolean): DefaultKeys;
    getCompressed(): boolean;
    /**
     * Get a public address of an uncompressed public key.
     *
     * @returns {string} The public address
     */
    getAddress(): string;
    /**
     * Get a public address of an uncompressed public key.
     *
     * @param {boolean} compressed - Compress public key (defaults to false)
     * @param {TransactionVersion} network - select Mainnet or Testnet for the address
     * @returns {string} The public address
     */
    getSTXAddress(compressed?: boolean, network?: TransactionVersion): string;
}
//# sourceMappingURL=keyPair.d.ts.map

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


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