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

Method decodeHex

kms/auth-eth/src/ethereum.ts:23–32  ·  view source on GitHub ↗
(hex: string, sz: number = 32)

Source from the content-addressed store, hash-verified

21 }
22
23 private decodeHex(hex: string, sz: number = 32): string {
24 // Remove '0x' prefix if present
25 hex = hex.startsWith('0x') ? hex.slice(2) : hex;
26
27 // Pad hex string to 64 characters (32 bytes)
28 hex = hex.padStart(sz * 2, '0');
29
30 // Add '0x' prefix back
31 return '0x' + hex;
32 }
33
34 async checkBoot(bootInfo: BootInfo, isKms: boolean): Promise<BootResponse> {
35 // Create boot info struct for contract call

Callers 1

checkBootMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected