crossmint_core library
Pure-Dart base primitives — config, transport, error types, chain
validation, and shared models. Re-exports
package:crossmint_core/crossmint_core.dart, plus the Flutter-side
CrossmintClientConfig and SDK version constant.
Classes
- CrossmintApiConfig
- Base configuration shared by every Crossmint SDK client.
- CrossmintApiVersions
- Centralised API version path prefixes used by every Crossmint service.
- CrossmintClientConfig
- Configuration for CrossmintClient.
- CrossmintHttpTransport
- CrossmintLogger
- CrossmintOrderCreateRequest
- CrossmintOrderReadRequest
- CrossmintOrderRecord
- CrossmintOrdersClient
- CrossmintOrderUpdateRequest
- CrossmintPollingConfig
- Configuration for exponential-backoff polling loops used throughout the SDK.
- CrossmintRequestOptions
- CrossmintTokenAvailabilityRecord
- CrossmintTokenAvailabilityResult
- CrossmintTokenQuery
- CrossmintTokensClient
- CrossmintTransport
- CrossmintTransportResponse
- CrossmintUser
- CrossmintUserCreateRequest
- CrossmintUserLookupRequest
- CrossmintUsersClient
- CrossmintWorldstoreListingRecord
- CrossmintWorldstoreListingSearchResult
- CrossmintWorldstoreOrderCreateRequest
- CrossmintWorldstoreSearchRequest
- NoopCrossmintLogger
Enums
- CrossmintChain
- Supported Crossmint blockchain chains.
- CrossmintChainFamily
- Top-level blockchain family discriminator.
- CrossmintEnvironment
- CrossmintErrorCode
- Typed error codes for programmatic exception handling.
Constants
- kCrossmintFlutterSdkVersion → const String
-
Version of the
crossmint_flutterSDK reported to the Crossmint backend (e.g. viasdkMetadataquery parameters on embedded checkout).
Functions
-
crossmintApiBaseUriForConfig(
CrossmintApiConfig config) → Uri -
crossmintApiBaseUriForEnvironment(
CrossmintEnvironment environment) → Uri -
crossmintEnvironmentForConfig(
CrossmintApiConfig config) → CrossmintEnvironment -
crossmintEnvironmentFromApiKey(
String apiKey) → CrossmintEnvironment -
crossmintEnvironmentFromUri(
Uri uri) → CrossmintEnvironment -
crossmintListEquals<
T> (List< T> ? a, List<T> ? b) → bool -
Structural equality for two nullable lists. Both null → equal. One null →
not equal. Otherwise length + element-wise
==comparison. -
crossmintListHash<
T> (List< T> ? list) → int - Combines the hash codes of a list's elements in order. Null → 0.
-
crossmintMapEquals<
K, V> (Map< K, V> ? a, Map<K, V> ? b) → bool -
Structural equality for two nullable maps. Both null → equal. One null →
not equal. Otherwise length + key-wise
==comparison. -
crossmintMapHash<
K, V> (Map< K, V> ? map) → int -
Combines the hash codes of a map's entries. Null → 0. Entries are combined
as
(key, value)pairs so the result is sensitive to both keys and values but order-independent across maps with identical content. -
crossmintPoll<
T extends Object> ({required Future< T?> action(int attempt), required Object onTimeout(), CrossmintPollingConfig config = const CrossmintPollingConfig()}) → Future<T> -
Polls
actionup toconfig.maxAttemptstimes with exponential backoff. -
crossmintSignerBridgeUriForEnvironment(
CrossmintEnvironment environment) → Uri
Typedefs
-
CrossmintJsonMap
= Map<
String, Object?>
Exceptions / Errors
- CrossmintAuthException
- Thrown by authentication flows — OTP failures, OAuth callback errors, session restore issues, JWT expiry, logout failures.
- CrossmintConfigurationException
- Thrown when the client is configured incorrectly — missing API key, invalid base URL, incompatible runtime overrides, etc.
- CrossmintCredentialsException
- Thrown by verifiable-credentials operations — malformed credential documents, verification failures, locator resolution errors.
- CrossmintDeserializationException
- Thrown when a JSON payload from the Crossmint API is missing a required field, contains the wrong type for a field, or otherwise cannot be parsed into a typed model. Carries the entity being parsed and the offending field so consumer code can react programmatically instead of pattern matching on the message string.
- CrossmintException
- Base class for every exception the Crossmint SDK throws.
- CrossmintOrdersException
- Thrown by checkout / order operations — invalid line items, payment method mismatches, order lookup failures.
- CrossmintSignerException
- Thrown by signer operations — missing host, rejected OTP, unsupported export, missing passkey callback, upstream signer-service errors.
- CrossmintTokensException
- Thrown by token-related operations — balance lookup failures, missing token metadata.
- CrossmintUsersException
- Thrown by user-profile operations — user lookup failures, profile update errors.
- CrossmintWalletException
- Thrown by wallet operations — lookup failures, unsupported chain, missing wallet, malformed transaction payloads.