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

Function deriveDeploymentVersionId

packages/airnode-node/src/workers/index.ts:55–67  ·  view source on GitHub ↗
(
  cloudProvider: LocalOrCloudProvider,
  airnodeAddress: string,
  stage: string,
  airnodeVersion: string,
  timestamp: string
)

Source from the content-addressed store, hash-verified

53}
54
55export function deriveDeploymentVersionId(
56 cloudProvider: LocalOrCloudProvider,
57 airnodeAddress: string,
58 stage: string,
59 airnodeVersion: string,
60 timestamp: string
61) {
62 return crypto
63 .createHash('sha256')
64 .update([...cloudProviderHashElements(cloudProvider), airnodeAddress, stage, airnodeVersion, timestamp].join(''))
65 .digest('hex')
66 .substring(0, DEPLOYMENT_ID_LENGTH);
67}

Callers 2

fetchDeploymentsFunction · 0.90
rollbackFunction · 0.90

Calls 1

Tested by

no test coverage detected