PHP WebShell
Текущая директория: /opt/BitGoJS/modules/sdk-core/dist/src/account-lib/util
Просмотр файла: crypto.d.ts
import { ExtendedKeys } from '../baseCoin';
/**
* @deprecated - use @bitgo/sdk-lib-mpc instead
*/
export { bigIntToHex, convertBigIntArrToHexArr, convertHexArrToBigIntArr, hexToBigInt } from '@bitgo/sdk-lib-mpc';
/**
* @param {string} xpub - a base-58 encoded extended public key (BIP32)
* @returns {string} the uncompressed public key in hexadecimal
*/
export declare function xpubToUncompressedPub(xpub: string): string;
/**
* @param {string} xpub - a base-58 encoded extended public key (BIP32)
* @returns {string} the uncompressed public key in hexadecimal
*/
export declare function xpubToCompressedPub(xpub: string): string;
/**
* @param {string} xprv - base58-encoded extended private key (BIP32)
* @returns {string} the hex-encoded raw private key
*/
export declare function xprvToRawPrv(xprv: string): string;
/**
* @param {string} prv - Private key in hex format to get the extended keys for
* @returns {ExtendedKeys} xprv and xpub in string format
*/
export declare function rawPrvToExtendedKeys(prv: string): ExtendedKeys;
/**
* Whether the input is a valid BIP32 xpub or not
*
* @param xpub
*/
export declare function isValidXpub(xpub: string): boolean;
/**
* Whether the input is a valid BIP32 xprv or not
*
* @param xprv
*/
export declare function isValidXprv(xprv: string): boolean;
/**
* Whether the input is a valid secp256k1 public key
*
* @param pub
*/
export declare function isValidPub(pub: string): boolean;
/**
* Whether the input is a valid secp256k1 private key
*
* @param prv
*/
export declare function isValidPrv(prv: string): boolean;
/**
* Whether the input is a valid ed25519 private key
*
* @param {string} prv A hexadecimal private key to validate
* @returns {boolean} Whether the input is a valid public key or not
*/
export declare function isValidEd25519Seed(prv: string): boolean;
/**
* Whether the input is a valid ed25519 private key
*
* @param {string} prv A hexadecimal private key to validate
* @returns {boolean} Whether the input is a valid public key or not
*/
export declare function isValidEd25519SecretKey(prv: string): boolean;
/**
* Whether the input is a valid ed25519 public key
*
* @param {string} pub A hexadecimal public key to validate
* @returns {boolean} Whether the input is a valid public key or not
*/
export declare function isValidEd25519PublicKey(pub: string): boolean;
/**
* Whether the input is a valid BLS private key
*
* @param {string} prv a private key to validate
* @returns {boolean} Whether the input is a valid private key or not
*/
export declare function isValidBLSPrivateKey(prv: string): boolean;
/**
* Whether input is a valid BLS public key
*
* @param {string} pub the public key to validate
* @returns {boolean} Whether input is a valid public key or not
*/
export declare function isValidBLSPublicKey(pub: string): boolean;
/**
* Whether input is a valid BLS signature
*
* @param {string} sig the signature to validate
* @returns {boolean} Whether input is a valid signature or not
*/
export declare function isValidBLSSignature(sig: string): boolean;
/**
* Returns an hex string of the given buffer
*
* @param {Buffer | Uint8Array} buffer - the buffer to be converted to hex
* @returns {string} - the hex value
*/
export declare function toHex(buffer: Buffer | Uint8Array): string;
/**
* Check if base58 decoded string is equale to length
*
* @param {string} value - string to be checked
* @param {number} length - expected decoded length
* @return {boolean} if the string can decoded as base58 and match the expected length
*/
export declare function isBase58(value: string, length: number): boolean;
/**
* Returns a Uint8Array of the given hex string
*
* @param {string} str - the hex string to be converted
* @returns {string} - the Uint8Array value
*/
export declare function toUint8Array(str: string): Uint8Array;
//# sourceMappingURL=crypto.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!