Skip to content

Commit

Permalink
account authenticate
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshan committed Oct 17, 2024
1 parent de08f40 commit b499fe7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/huma-shared/src/services/IdentityServiceV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,32 @@ const approveLender = async (
)}/wallets/${walletAddress}/approve-lender?chainId=${chainId}&contractAddress=${contractAddress}`,
)

/**
* Authenticate wallet account.
*
* @param {string} walletAddress The wallet address.
* @param {number} chainId Chain ID.
* @param {boolean} isDev Is dev environment or not.
* @returns {Promise<void>} Promise that returns void.
*/
const authenticate = async (
walletAddress: string,
chainId: number,
isDev = false,
): Promise<void> =>
requestPost<void>(
`${configUtil.getIdentityAPIUrl(
chainId,
isDev,
)}/wallets/${walletAddress}/authenticate?chainId=${chainId}`,
)

export const IdentityServiceV2 = {
getVerificationStatusV2,
accredit,
startVerification,
resumeVerification,
consentToSubscription,
approveLender,
authenticate,
}

0 comments on commit b499fe7

Please sign in to comment.