-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from Web3Auth/feat/config_api
Feat/config api
- Loading branch information
Showing
11 changed files
with
261 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.web3auth.core.api | ||
|
||
import com.web3auth.core.types.ProjectConfigResponse | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
import retrofit2.http.Query | ||
|
||
interface ApiService { | ||
|
||
@GET("/api/configuration") | ||
suspend fun fetchProjectConfig( | ||
@Query("project_id") project_id: String, @Query("network") network: String, | ||
@Query("whitelist") whitelist: String = "true" | ||
): Response<ProjectConfigResponse> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
core/src/main/java/com/web3auth/core/types/ProjectConfigResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.web3auth.core.types | ||
|
||
import androidx.annotation.Keep | ||
|
||
@Keep | ||
data class WhitelistResponse( | ||
val urls: List<String>, | ||
val signed_urls: Map<String, String> | ||
) | ||
|
||
@Keep | ||
data class ProjectConfigResponse( | ||
val whitelabel: WhiteLabelData? = null, | ||
val sms_otp_enabled: Boolean, | ||
val wallet_connect_enabled: Boolean, | ||
val wallet_connect_project_id: String?, | ||
val whitelist: WhitelistResponse?, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ enum class Provider { | |
GITHUB, | ||
@SerializedName("kakao") | ||
KAKAO, | ||
|
||
@SerializedName("linkedin") | ||
LINKEDIN, | ||
|
||
|
Oops, something went wrong.