PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@iota/iota-sdk/dist/esm/cryptography
Просмотр файла: keypair.d.ts
import type { IntentScope } from './intent.js';
import type { PublicKey } from './publickey.js';
import type { SignatureScheme } from './signature-scheme.js';
export declare const PRIVATE_KEY_SIZE = 32;
export declare const LEGACY_PRIVATE_KEY_SIZE = 64;
export declare const IOTA_PRIVATE_KEY_PREFIX = "iotaprivkey";
export type ParsedKeypair = {
schema: SignatureScheme;
secretKey: Uint8Array;
};
export interface SignatureWithBytes {
bytes: string;
signature: string;
}
/**
* TODO: Document
*/
export declare abstract class Signer {
abstract sign(bytes: Uint8Array): Promise<Uint8Array>;
/**
* Sign messages with a specific intent. By combining the message bytes with the intent before hashing and signing,
* it ensures that a signed message is tied to a specific purpose and domain separator is provided
*/
signWithIntent(bytes: Uint8Array, intent: IntentScope): Promise<SignatureWithBytes>;
/**
* Signs provided transaction by calling `signWithIntent()` with a `TransactionData` provided as intent scope
*/
signTransaction(bytes: Uint8Array): Promise<SignatureWithBytes>;
/**
* Signs provided personal message by calling `signWithIntent()` with a `PersonalMessage` provided as intent scope
*/
signPersonalMessage(bytes: Uint8Array): Promise<{
bytes: string;
signature: string;
}>;
toIotaAddress(): string;
/**
* Get the key scheme of the keypair: Secp256k1 or ED25519
*/
abstract getKeyScheme(): SignatureScheme;
/**
* The public key for this keypair
*/
abstract getPublicKey(): PublicKey;
}
export declare abstract class Keypair extends Signer {
/**
* This returns the Bech32 secret key string for this keypair.
*/
abstract getSecretKey(): string;
}
/**
* This returns an ParsedKeypair object based by validating the
* 33-byte Bech32 encoded string starting with `iotaprivkey`, and
* parse out the signature scheme and the private key in bytes.
*/
export declare function decodeIotaPrivateKey(value: string): ParsedKeypair;
/**
* This returns a Bech32 encoded string starting with `iotaprivkey`,
* encoding 33-byte `flag || bytes` for the given the 32-byte private
* key and its signature scheme.
*/
export declare function encodeIotaPrivateKey(bytes: Uint8Array, scheme: SignatureScheme): string;
Выполнить команду
Для локальной разработки. Не используйте в интернете!