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

Method decodeHex

kms/auth-eth-bun/index.ts:114–121  ·  view source on GitHub ↗
(hex: string, sz: number = 32)

Source from the content-addressed store, hash-verified

112 }
113
114 private decodeHex(hex: string, sz: number = 32): Hex {
115 // remove '0x' prefix if present
116 hex = hex.startsWith('0x') ? hex.slice(2) : hex;
117 // pad hex string to specified size
118 hex = hex.padStart(sz * 2, '0');
119 // add '0x' prefix back
120 return `0x${hex}` as Hex;
121 }
122
123 async checkBoot(bootInfo: BootInfo, isKms: boolean): Promise<BootResponse> {
124 // create boot info struct for contract call

Callers 1

checkBootMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected