MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / ensureAlgorithmSupported

Method ensureAlgorithmSupported

sdk/js/src/index.ts:207–214  ·  view source on GitHub ↗
(algorithm: string)

Source from the content-addressed store, hash-verified

205 }
206
207 private async ensureAlgorithmSupported(algorithm: string): Promise<void> {
208 if (SECP256K1_ALGORITHMS.has(algorithm)) return
209 try {
210 await this.version()
211 } catch {
212 throw new Error(`algorithm "${algorithm}" is not supported: OS version too old (Version RPC unavailable)`)
213 }
214 }
215
216 async getKey(path: string, purpose: string = '', algorithm: string = 'secp256k1'): Promise<GetKeyResponse> {
217 await this.ensureAlgorithmSupported(algorithm)

Callers 1

getKeyMethod · 0.95

Calls 1

versionMethod · 0.95

Tested by

no test coverage detected