UNPKG

@neardefi/shade-agent-js

Version:

This library is intended to be used in conjunction with the [shade agent template](https://github.com/NearDeFi/shade-agent-template/).

25 lines (23 loc) 1.14 kB
interface DeriveKeyResponse { key: string; certificate_chain: string[]; asUint8Array: (max_length?: number) => Uint8Array; } type Hex = `0x${string}`; type TdxQuoteHashAlgorithms = 'sha256' | 'sha384' | 'sha512' | 'sha3-256' | 'sha3-384' | 'sha3-512' | 'keccak256' | 'keccak384' | 'keccak512' | 'raw'; interface TdxQuoteResponse { quote: Hex; event_log: string; replayRtmrs: () => string[]; } declare function to_hex(data: string | Buffer | Uint8Array): string; declare function send_rpc_request<T = any>(endpoint: string, path: string, payload: string): Promise<T>; declare class TappdClient { private endpoint; constructor(endpoint?: string); getInfo(): Promise<any>; extendRtmr3(event: string, payload: string | object): Promise<any>; deriveKey(path?: string, subject?: string, alt_names?: string[]): Promise<DeriveKeyResponse>; tdxQuote(report_data: string | Buffer | Uint8Array, hash_algorithm?: TdxQuoteHashAlgorithms): Promise<TdxQuoteResponse>; } export { type DeriveKeyResponse, type Hex, TappdClient, type TdxQuoteHashAlgorithms, type TdxQuoteResponse, send_rpc_request, to_hex };