Class StarknetChainId
-
- All Implemented Interfaces:
-
com.swmansion.starknet.data.types.StarknetResponse
@Serializable(with = StarknetChainIdSerializer.class) public final class StarknetChainId implements StarknetResponse
-
-
Field Summary
Fields Modifier and Type Field Description public final static StarknetChainId
MAIN
public final static StarknetChainId
SEPOLIA
public final static StarknetChainId
INTEGRATION_SEPOLIA
private final Felt
value
-
Constructor Summary
Constructors Constructor Description StarknetChainId(Felt value)
-
Method Summary
Modifier and Type Method Description final Felt
getValue()
final String
toNetworkName()
Transform StarknetChainId to a network name represented as ASCII string. final static StarknetChainId
fromNetworkName(String networkName)
Create StarknetChainId from a network name represented as ASCII string. final static StarknetChainId
fromHex(String hex)
Create StarknetChainId from a hex string. -
-
Constructor Detail
-
StarknetChainId
StarknetChainId(Felt value)
-
-
Method Detail
-
toNetworkName
final String toNetworkName()
Transform StarknetChainId to a network name represented as ASCII string. Example: StarknetChainId.SEPOLIA -> "SN_SEPOLIA"
-
fromNetworkName
final static StarknetChainId fromNetworkName(String networkName)
Create StarknetChainId from a network name represented as ASCII string.
- Parameters:
networkName
- string transformed to StarknetChainId
-
fromHex
final static StarknetChainId fromHex(String hex)
Create StarknetChainId from a hex string.
- Parameters:
hex
- string transformed to StarknetChainId
-
-
-
-