export declare const PEPPER_SEPARATOR = "__"; /** * Standardized prefixes for ODIS identifiers. * * @remarks These prefixes prevent collisions between off-chain identifiers. * i.e. if a user's instagram and twitter handles are the same, * these prefixes prevent the ODIS identifers from being the same. * * If you would like to use a prefix that isn't included, please put up a PR * adding it to @celo/base (in celo-monorepo/packages/sdk/base/src/identifier.ts) * to ensure interoperability with other projects. When adding new prefixes, * please use either the full platform name in all lowercase (e.g. 'facebook') * or DID methods https://w3c.github.io/did-spec-registries/#did-methods. * Make sure to add the expected value for the unit test case in * `celo-monorepo/packages/sdk/base/src/identifier.test.ts`, * otherwise the test will fail. * * The NULL prefix is included to allow projects to use the sdk without selecting * a predefined prefix or adding their own. Production use of the NULL prefix is * discouraged since identifiers will not be interoperable with other projects. * Please think carefully before using the NULL prefix. */ export declare enum IdentifierPrefix { NULL = "", PHONE_NUMBER = "tel", EMAIL = "mailto", TWITTER = "twit", FACEBOOK = "facebook", INSTAGRAM = "instagram", DISCORD = "discord", TELEGRAM = "telegram", SIGNAL = "signal" } /** * Concatenates the identifierPrefix and plaintextIdentifier with the separator '://' * * @param plaintextIdentifier Off-chain identifier, ex: phone number, twitter handle, email, etc. * @param identifierPrefix Standardized prefix used to prevent collisions between identifiers */ export declare const getPrefixedIdentifier: (plaintextIdentifier: string, identifierPrefix: IdentifierPrefix) => string; /** * Helper function for getIdentifierHash in @celo/identity, so that this can * be used in protocol tests without dependency issues. * * @remarks * Concatenates the plaintext prefixed identifier with the pepper derived by hashing the unblinded * signature returned by ODIS. * * @param sha3 Hash function (i.e. soliditySha3) to use to generate the identifier * @param plaintextIdentifier Off-chain identifier, ex: phone number, twitter handle, email, etc. * @param identifierPrefix Standardized prefix used to prevent collisions between identifiers * @param pepper Hash of the unblinded signature returned by ODIS */ export declare const getIdentifierHash: (sha3: (a: string) => string | null, plaintextIdentifier: string, identifierPrefix: IdentifierPrefix, pepper: string) => string;