(templateId: string, timestamp: string, data: string)
| 90 | } |
| 91 | |
| 92 | export function signWithTemplateId(templateId: string, timestamp: string, data: string) { |
| 93 | const airnodeWallet = getAirnodeWalletFromPrivateKey(); |
| 94 | |
| 95 | return airnodeWallet.signMessage( |
| 96 | ethers.utils.arrayify( |
| 97 | ethers.utils.keccak256( |
| 98 | ethers.utils.solidityPack(['bytes32', 'uint256', 'bytes'], [templateId, timestamp, data || '0x']) |
| 99 | ) |
| 100 | ) |
| 101 | ); |
| 102 | } |
| 103 | |
| 104 | export function verifyRequestId(payload: RegularApiCallPayload): LogsData<ApiCallErrorResponse> | null { |
| 105 | const { aggregatedApiCall } = payload; |
no test coverage detected