(hex: string, sz: number = 32)
| 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 |