Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODIS V1 Sunset #10444

Merged
merged 20 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/sdk/identity/src/odis/identifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export interface IdentifierHashDetails {
* @param blsBlindingClient Optional Performs blinding and unblinding, defaults to WasmBlsBlindingClient
* @param sessionID Optional Used to track user sessions across the client and ODIS
* @param keyVersion Optional For testing. Specifies which version key ODIS should use
* @param endpoint Optional Allows client to specify the legacy endpoint if they desire (will be deprecated)
* @param abortController Optional Allows client to specify a timeout for the ODIS request
*/
export async function getObfuscatedIdentifier(
Expand All @@ -114,7 +113,6 @@ export async function getObfuscatedIdentifier(
blsBlindingClient?: BlsBlindingClient,
sessionID?: string,
keyVersion?: number,
endpoint?: CombinerEndpointPNP.PNP_SIGN,
abortController?: AbortController
): Promise<IdentifierHashDetails> {
debug('Getting identifier pepper')
Expand Down Expand Up @@ -147,7 +145,6 @@ export async function getObfuscatedIdentifier(
clientVersion,
sessionID,
keyVersion,
endpoint ?? CombinerEndpointPNP.PNP_SIGN,
abortController
)

Expand Down Expand Up @@ -202,7 +199,6 @@ export async function getBlindedIdentifier(
* @param clientVersion Optional Specifies the client software version
* @param sessionID Optional Used to track user sessions across the client and ODIS
* @param keyVersion Optional For testing. Specifies which version key ODIS should use
* @param endpoint Optional Allows client to specify the legacy endpoint if they desire (will be deprecated)
* @param abortController Optional Allows client to specify a timeout for the ODIS request
*/
export async function getBlindedIdentifierSignature(
Expand All @@ -213,7 +209,6 @@ export async function getBlindedIdentifierSignature(
clientVersion?: string,
sessionID?: string,
keyVersion?: number,
endpoint?: CombinerEndpointPNP.PNP_SIGN,
abortControlller?: AbortController
): Promise<string> {
const body: SignMessageRequest = {
Expand All @@ -227,7 +222,7 @@ export async function getBlindedIdentifierSignature(
const response = await queryOdis(
body,
context,
endpoint ?? CombinerEndpointPNP.PNP_SIGN,
CombinerEndpointPNP.PNP_SIGN,
SignMessageResponseSchema,
{
[KEY_VERSION_HEADER]: keyVersion?.toString(),
Expand Down
14 changes: 5 additions & 9 deletions packages/sdk/identity/src/odis/phone-number-identifier.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { CombinerEndpointPNP } from '@celo/phone-number-privacy-common'
import BigNumber from 'bignumber.js'
import debugFactory from 'debug'
import { BlsBlindingClient } from './bls-blinding-client'
Expand Down Expand Up @@ -39,8 +38,8 @@ export async function getPhoneNumberIdentifier(
clientVersion?: string,
blsBlindingClient?: BlsBlindingClient,
sessionID?: string,
keyVersion?: number,
endpoint?: CombinerEndpointPNP.PNP_SIGN
keyVersion?: number
// endpoint?: CombinerEndpointPNP.PNP_SIGN
): Promise<PhoneNumberHashDetails> {
alecps marked this conversation as resolved.
Show resolved Hide resolved
debug('Getting phone number pepper')

Expand All @@ -55,8 +54,7 @@ export async function getPhoneNumberIdentifier(
clientVersion,
blsBlindingClient,
sessionID,
keyVersion,
endpoint
keyVersion
)
return {
e164Number: plaintextIdentifier,
Expand Down Expand Up @@ -92,8 +90,7 @@ export async function getBlindedPhoneNumberSignature(
base64BlindedMessage: string,
clientVersion?: string,
sessionID?: string,
keyVersion?: number,
endpoint?: CombinerEndpointPNP.PNP_SIGN
keyVersion?: number
): Promise<string> {
return getBlindedIdentifierSignature(
account,
Expand All @@ -102,8 +99,7 @@ export async function getBlindedPhoneNumberSignature(
base64BlindedMessage,
clientVersion,
sessionID,
keyVersion,
endpoint
keyVersion
)
}

Expand Down
Loading