@phala/dstack-sdk
Version:
18 lines (15 loc) • 743 B
text/typescript
import { GetTlsKeyResponse, GetKeyResponse } from './index.mjs';
import { Keypair } from '@solana/web3.js';
import './get-compose-hash.mjs';
import './verify-env-encrypt-public-key.mjs';
/**
* @deprecated use toKeypairSecure instead. This method has security concerns.
* Current implementation uses raw key material without proper hashing.
*/
declare function toKeypair(keyResponse: GetTlsKeyResponse | GetKeyResponse): Keypair;
/**
* Creates a Solana Keypair from DeriveKeyResponse using secure key derivation.
* This method applies SHA256 hashing to the complete key material for enhanced security.
*/
declare function toKeypairSecure(keyResponse: GetTlsKeyResponse | GetKeyResponse): Keypair;
export { toKeypair, toKeypairSecure };