PHP WebShell

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

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

import * as stellar from 'stellar-sdk';
/**
 * Creates a Stellar keypair from a public key.
 * Public key can be either a raw root public key (hex string) or a Stellar public key (prefixed with 'G')
 * @param pub Either hex root public key or Stellar public key
 * @returns Stellar keypair from the provided pub
 */
export declare function createStellarKeypairFromPub(pub: string): stellar.Keypair;
/**
 * Creates a Stellar keypair from a private key.
 * Private key can be either a raw root private key (hex string) or a Stellar private key (prefixed with 'S').
 * @param secret Either hex root private key or Stellar private key
 * @returns Stellar keypair from the provided prv
 */
export declare function createStellarKeypairFromPrv(prv: string): stellar.Keypair;
/**
 * @deprecated Use isValidStellarPublicKey instead
 *
 * Validates a Stellar public key
 * Stellar public keys are prefixed with 'G'
 * @param pub A Stellar public key to validate
 * @returns Whether the input is a valid Stellar public key
 */
export declare function isValidStellarPub(pub: string): boolean;
/**
 * Validates a Stellar public key
 * Stellar public keys are prefixed with 'G'
 * @param pub A Stellar public key to validate
 * @returns Whether the input is a valid Stellar public key
 */
export declare function isValidStellarPublicKey(pub: string): boolean;
/**
 * @deprecated Use isValidRootPublicKey instead
 *
 * Validates a ed25519 root public key
 * @param pub A hexadecimal public key to validate
 * @returns Whether the input is a valid public key
 */
export declare function isValidPublicKey(pub: string): boolean;
/**
 * Validates a ed25519 root public key
 * @param pub A hexadecimal public key to validate
 * @returns Whether the input is a valid public key
 */
export declare function isValidRootPublicKey(pub: string): boolean;
/**
 * @deprecated Use isValidStellarPrivateKey instead
 *
 * Validates a Stellar private key
 * Stellar private keys are prefixed with 'S'
 * @param seed A Stellar private key to validate
 * @returns Whether the input is a valid Stellar private key
 */
export declare function isValidStellarPrv(seed: string): boolean;
/**
 * Validates a Stellar private key
 * Stellar private keys are prefixed with 'S'
 * @param seed A Stellar private key to validate
 * @returns Whether the input is a valid Stellar private key
 */
export declare function isValidStellarPrivateKey(seed: string): boolean;
/**
 * @deprecated Use isValidRootPrivateKey instead
 *
 * Validates a ed25519 root private key
 * @param prv A hexadecimal private key to validate
 * @returns Whether the input is a valid private key
 */
export declare function isValidPrivateKey(prv: string): boolean;
/**
 * Validates a ed25519 root private key
 * @param prv A hexadecimal private key to validate
 * @returns Whether the input is a valid private key
 */
export declare function isValidRootPrivateKey(prv: string): boolean;
/**
 * Encodes a raw public key to a G-prefixed Stellar public key
 * @param pub Raw public key
 * @returns Encoded Stellar public key
 */
export declare function encodePublicKey(pub: Buffer): string;
/**
 * Encodes a raw private key to a S-prefixed Stellar private key
 * @param prv Raw private key
 * @returns Encoded Stellar private key
 */
export declare function encodePrivateKey(prv: Buffer): string;
/**
 * Decodes a Stellar public key to a raw public key
 * @param pub Encoded Stellar G-prefixed public key
 * @returns Raw hexadecimal public key
 */
export declare function decodePublicKey(pub: string): Buffer;
/**
 * Decodes a Stellar private key to a raw private key
 * @param prv Encoded Stellar S-prefixed private key
 * @returns Raw hexadecimal private key
 */
export declare function decodePrivateKey(prv: string): Buffer;
//# sourceMappingURL=utils.d.ts.map

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


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