OverviewFilesCommitsIssuesDocsReleasesPeers

P2P-Hiverelay / packages / blind-protocol / client-composition-authority-generated.js

58 lines · javascript ref:
/* eslint-disable */
// Generated by scripts/generate-blind-client-composition-authority.mjs. Do not edit.
export const CLIENT_COMPOSITION_AUTHORITY_V1 = Object.freeze({
  ...{
  "profile": "client-composition-authority-v1",
  "authorityVersion": 1,
  "formatMajor": 1,
  "formatMinor": 0,
  "specificationArtifact": "docs/protocol/HIVERELAY-BLIND-CLIENT-COMPOSITION-V1.md",
  "formatAuthorityArtifact": "packages/blind-protocol/hiverelay-blind-client-composition-format-v1.cenc",
  "schemaCatalogArtifact": "packages/blind-protocol/hiverelay-blind-client-composition-schema-catalog-v1.cenc",
  "vectorManifestArtifact": "packages/blind-protocol/hiverelay-blind-client-composition-vector-manifest-v1.cenc",
  "vectorRoot": "packages/blind-protocol/vectors/client-composition",
  "formatHash": "5637708aff4a6e93a6ff3a2f96361aa0b1597c229346e124eebeb2d7618ae09a",
  "vectorSetHash": "ea176ea78a611256689604541e55ba420d426dda2fa4dd64fb3ac9ac7503934d",
  "schemaCount": 6,
  "vectorCount": 18
},
  schemaNames: Object.freeze([
  "BlindCoreReadCapV1",
  "CellBlobV1",
  "OpaqueChainCheckpointV1",
  "OpaqueChainFrameV1",
  "ReadCellCapV1",
  "WriteCellCapV1"
])
})

export const CLIENT_COMPOSITION_AUTHORITY_STATUS = Object.freeze({
  profile: 'client-composition-authority-v1',
  authorityArtifactPath: "packages/blind-protocol/hiverelay-blind-client-composition-format-v1.cenc",
  schemaCatalogArtifactPath: "packages/blind-protocol/hiverelay-blind-client-composition-schema-catalog-v1.cenc",
  vectorManifestPath: "packages/blind-protocol/hiverelay-blind-client-composition-vector-manifest-v1.cenc",
  metadataPath: "packages/blind-protocol/hiverelay-blind-client-composition-authority-v1.json",
  schemaNames: Object.freeze([
  "BlindCoreReadCapV1",
  "CellBlobV1",
  "OpaqueChainCheckpointV1",
  "OpaqueChainFrameV1",
  "ReadCellCapV1",
  "WriteCellCapV1"
]),
  schemaCount: 6,
  vectorCount: 18,
  formatAuthorityPublished: true,
  vectorAuthorityPublished: true,
  releaseBlockers: Object.freeze([]),
  releaseReady: true
})

export function assertClientCompositionAuthorityReady () {
  if (CLIENT_COMPOSITION_AUTHORITY_STATUS.releaseReady) return CLIENT_COMPOSITION_AUTHORITY_STATUS
  const error = new Error('client-composition binary authority is incomplete')
  error.code = 'BLIND_CLIENT_COMPOSITION_AUTHORITY_INCOMPLETE'
  error.releaseBlockers = [...CLIENT_COMPOSITION_AUTHORITY_STATUS.releaseBlockers]
  throw error
}