Skip to content

@ecp.eth/sdk


@ecp.eth/sdk / comments / createKeyTypeMap

Function: createKeyTypeMap()

function createKeyTypeMap(knownKeys): Record<Hex, {
  key: string;
  type: MetadataType;
}>;

Defined in: packages/sdk/src/comments/metadata.ts:311

Helper function to create a key-type mapping for known metadata keys This should be maintained by applications to properly convert from contract format

Parameters

knownKeys

{ key: string; type: MetadataType; }[]

Array of known key-type pairs

Returns

Record<Hex, { key: string; type: MetadataType; }>

Mapping from hashed key to original key and type