dstack-sdk-types

Crates.iodstack-sdk-types
lib.rsdstack-sdk-types
version0.1.0
created_at2025-09-03 00:11:36.211914+00
updated_at2025-09-03 00:11:36.211914+00
descriptionThis crate provides rust types for communication with dstack
homepage
repository
max_upload_size
id1821823
size89,011
Kevin Wang (kvinwang)

documentation

README

dstack SDK Types

This crate provides Rust type definitions for communication with both the current dstack server and the legacy tappd service. It contains serializable structures and response types used by the dstack SDK clients.

Installation

[dependencies]
dstack-sdk-types = { git = "https://github.com/Dstack-TEE/dstack.git" }

Overview

This crate is #![no_std] compatible and provides two main modules:

  • dstack - Types for the current dstack API
  • tappd - Types for the legacy tappd API

Basic Usage

use dstack_sdk_types::dstack::{GetKeyResponse, GetQuoteResponse, InfoResponse};
use dstack_sdk_types::tappd::{DeriveKeyResponse, TdxQuoteResponse, TappdInfoResponse};

// Parse a response from the dstack API
let key_response: GetKeyResponse = serde_json::from_str(&json_data)?;
let key_bytes = key_response.decode_key()?;

// Parse a quote response and replay RTMRs
let quote_response: GetQuoteResponse = serde_json::from_str(&json_data)?;
let rtmrs = quote_response.replay_rtmrs()?;

// Work with legacy tappd types
let derive_response: DeriveKeyResponse = serde_json::from_str(&json_data)?;
let private_key_bytes = derive_response.decode_key()?; // Extracts 32-byte ECDSA P-256 key

License

Apache License

Commit count: 0

cargo fmt