Skip to content

@ecp.eth/sdk


@ecp.eth/sdk / comments / createKeyTypeMap

Function: createKeyTypeMap()

function createKeyTypeMap(knownKeys): MetadataKeyTypeMap;

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

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

MetadataKeyTypeMap

Mapping from hex-encoded key to original key and type