MCPcopy Create free account
hub / github.com/api3dao/airnode / signWithTemplateId

Function signWithTemplateId

packages/airnode-node/src/api/index.ts:92–102  ·  view source on GitHub ↗
(templateId: string, timestamp: string, data: string)

Source from the content-addressed store, hash-verified

90}
91
92export 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
104export function verifyRequestId(payload: RegularApiCallPayload): LogsData<ApiCallErrorResponse> | null {
105 const { aggregatedApiCall } = payload;

Callers 1

processSuccessfulApiCallFunction · 0.85

Calls 1

Tested by

no test coverage detected