Updated on 2026-08-14
This commit is contained in:
parent
ff5df41d6a
commit
1626270ae9
17 changed files with 118 additions and 2 deletions
|
|
@ -34,6 +34,14 @@ internal object BlockchainSDKConfigConverter : Converter<EnvironmentConfigModel,
|
|||
apiKey = value.quiknodeMonadApiKey,
|
||||
subdomain = value.quiknodeMonadSubdomain,
|
||||
),
|
||||
quickNodeBerachainCredentials = QuickNodeCredentials(
|
||||
apiKey = value.quiknodeBerachainApiKey,
|
||||
subdomain = value.quiknodeBerachainSubdomain,
|
||||
),
|
||||
quickNodeStellarCredentials = QuickNodeCredentials(
|
||||
apiKey = value.quiknodeStellarApiKey,
|
||||
subdomain = value.quiknodeStellarSubdomain,
|
||||
),
|
||||
infuraProjectId = value.infuraProjectId,
|
||||
tronGridApiKey = value.tronGridApiKey,
|
||||
nowNodeCredentials = NowNodeCredentials(value.nowNodesApiKey),
|
||||
|
|
@ -116,6 +124,7 @@ internal object BlockchainSDKConfigConverter : Converter<EnvironmentConfigModel,
|
|||
tezos = GetBlockAccessToken(rest = accessTokens.tezos?.rest),
|
||||
monad = GetBlockAccessToken(rest = accessTokens.monad?.rest),
|
||||
stellar = GetBlockAccessToken(rest = accessTokens.stellar?.rest),
|
||||
berachain = GetBlockAccessToken(jsonRpc = accessTokens.berachain?.jsonRPC),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,14 @@ internal object GeneratedEnvironmentConfigConverter {
|
|||
}
|
||||
}
|
||||
|
||||
private fun createQuickNodeCredentials(apiKey: String?, subdomain: String?): QuickNodeCredentials? {
|
||||
return if (!apiKey.isNullOrEmpty() && !subdomain.isNullOrEmpty()) {
|
||||
QuickNodeCredentials(apiKey = apiKey, subdomain = subdomain)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
private fun createBlockchainSdkConfig(): BlockchainSdkConfig {
|
||||
return BlockchainSdkConfig(
|
||||
blockchairCredentials = BlockchairCredentials(
|
||||
|
|
@ -95,6 +103,14 @@ internal object GeneratedEnvironmentConfigConverter {
|
|||
apiKey = GeneratedEnvironmentConfig.quiknodeMonadApiKey,
|
||||
subdomain = GeneratedEnvironmentConfig.quiknodeMonadSubdomain,
|
||||
),
|
||||
quickNodeBerachainCredentials = createQuickNodeCredentials(
|
||||
apiKey = GeneratedEnvironmentConfig.quiknodeBerachainApiKey,
|
||||
subdomain = GeneratedEnvironmentConfig.quiknodeBerachainSubdomain,
|
||||
),
|
||||
quickNodeStellarCredentials = QuickNodeCredentials(
|
||||
apiKey = GeneratedEnvironmentConfig.quiknodeStellarApiKey,
|
||||
subdomain = GeneratedEnvironmentConfig.quiknodeStellarSubdomain,
|
||||
),
|
||||
infuraProjectId = GeneratedEnvironmentConfig.infuraProjectId,
|
||||
tronGridApiKey = GeneratedEnvironmentConfig.tronGridApiKey,
|
||||
nowNodeCredentials = NowNodeCredentials(apiKey = GeneratedEnvironmentConfig.nowNodesApiKey),
|
||||
|
|
@ -176,6 +192,7 @@ internal object GeneratedEnvironmentConfigConverter {
|
|||
tezos = GetBlockAccessToken(rest = GetBlockAccessTokens.Tezos.rest),
|
||||
monad = GetBlockAccessToken(rest = GetBlockAccessTokens.Monad.rest),
|
||||
stellar = GetBlockAccessToken(rest = GetBlockAccessTokens.Stellar.rest),
|
||||
berachain = GetBlockAccessToken(rest = GetBlockAccessTokens.Berachain.rest),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,10 @@ class EnvironmentConfigModel(
|
|||
@Json(name = "quiknodePlasmaApiKey") val quiknodePlasmaApiKey: String,
|
||||
@Json(name = "quiknodeMonadSubdomain") val quiknodeMonadSubdomain: String,
|
||||
@Json(name = "quiknodeMonadApiKey") val quiknodeMonadApiKey: String,
|
||||
@Json(name = "quiknodeBerachainSubdomain") val quiknodeBerachainSubdomain: String,
|
||||
@Json(name = "quiknodeBerachainApiKey") val quiknodeBerachainApiKey: String,
|
||||
@Json(name = "quiknodeStellarSubdomain") val quiknodeStellarSubdomain: String,
|
||||
@Json(name = "quiknodeStellarApiKey") val quiknodeStellarApiKey: String,
|
||||
@Json(name = "nowNodesApiKey") val nowNodesApiKey: String,
|
||||
@Json(name = "getBlockAccessTokens") val getBlockAccessTokens: GetBlockAccessTokens?,
|
||||
@Json(name = "tonCenterApiKey") val tonCenterKeys: TonCenterKeys,
|
||||
|
|
@ -101,6 +105,7 @@ data class GetBlockAccessTokens(
|
|||
@Json(name = "tezos") val tezos: GetBlockToken?,
|
||||
@Json(name = "monad") val monad: GetBlockToken?,
|
||||
@Json(name = "stellar") val stellar: GetBlockToken?,
|
||||
@Json(name = "berachain") val berachain: GetBlockToken?,
|
||||
)
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue