crossmint_verifiable_credentials library

Verifiable credentials surface — credential queries, locators, issuance, and verification helpers. Re-exports package:crossmint_verifiable_credentials/crossmint_verifiable_credentials.dart plus the core barrel.

Classes

CredentialsApiService
CredentialService
CrossmintApiConfig
Base configuration shared by every Crossmint SDK client.
CrossmintApiVersions
Centralised API version path prefixes used by every Crossmint service.
CrossmintClientConfig
Configuration for CrossmintClient.
CrossmintContractMetadataService
Fetches and validates on-chain contract metadata (ERC-7572) for verifiable credential collections.
CrossmintCredentialDecryptRequest
CrossmintCredentialFilter
CrossmintCredentialLocator
CrossmintCredentialMetadata
CrossmintCredentialNftLookupResult
CrossmintCredentialQuery
CrossmintCredentialRecord
CrossmintCredentialRetrievalProcedure
CrossmintCredentialsClient
CrossmintCredentialsCollection
CrossmintCredentialType
CrossmintCredentialVerificationResult
CrossmintCredentialWalletAuthChallenge
CrossmintDecrypt
CrossmintDecryptedCredential
CrossmintDelegationSignatureService
Fetches a Lit Protocol capacity delegation signature from the Crossmint API.
CrossmintEncryptedVerifiableCredential
CrossmintHttpTransport
CrossmintLogger
CrossmintNftService
On-chain NFT service for VC operations: burn checks, token URIs, and contract metadata URIs.
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
CrossmintVcConfig
Configuration for VC on-chain services: RPC endpoints, IPFS gateways, and timeouts.
CrossmintVcIssuer
CrossmintVcNft
CrossmintVcRpcClient
Minimal JSON-RPC client for read-only Ethereum contract calls.
CrossmintVerifiableCredential
CrossmintVerifiableCredentialEncryption
CrossmintWorldstoreListingRecord
CrossmintWorldstoreListingSearchResult
CrossmintWorldstoreOrderCreateRequest
CrossmintWorldstoreSearchRequest
Eip712VerificationInvalid
The proof was rejected. reason is a short, non-user-facing label describing which structural check failed.
Eip712VerificationResult
Outcome of an EIP-712 proof verification attempt.
Eip712VerificationStructuralOnly
The proof's envelope is well-formed (issuer DID parses, signature is 65 bytes) but the signature was not cryptographically verified.
Eip712VerificationValid
The proof was cryptographically verified against the issuer's address.
NoopCrossmintLogger
WalletAuthService

Enums

CrossmintChain
Supported Crossmint blockchain chains.
CrossmintChainFamily
Top-level blockchain family discriminator.
CrossmintEnvironment
CrossmintErrorCode
Typed error codes for programmatic exception handling.
CrossmintVcChain
CrossmintVerifiableCredentialEncryptionType

Constants

kContractUriSelector → const String
ERC-7572 contractURI() selector.
kCrossmintFlutterSdkVersion → const String
Version of the crossmint_flutter SDK reported to the Crossmint backend (e.g. via sdkMetadata query parameters on embedded checkout).
kOwnerOfSelector → const String
ERC-721 ownerOf(uint256) selector.
kTokenUriSelector → const String
ERC-721 tokenURI(uint256) selector.
kZeroAddress → const String
Ethereum zero address.

Functions

abiDecodeAddress(String hexData) String
Decodes an ABI-encoded address (last 20 bytes of a 32-byte word).
abiDecodeString(String hexData) String
Decodes an ABI-encoded dynamic string (offset + length + data).
abiEncodeUint256(String tokenId) String
Encodes a uint256 token ID as a 32-byte hex word (no 0x prefix).
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 action up to config.maxAttempts times with exponential backoff.
crossmintRetrievalProcedure(CrossmintCredentialsClient client) CrossmintCredentialRetrievalProcedure
crossmintSignerBridgeUriForEnvironment(CrossmintEnvironment environment) Uri
decryptSymmetricCredential(CrossmintEncryptedVerifiableCredential credential, Uint8List secretKey) CrossmintVerifiableCredential
Decrypts an AES-256-GCM encrypted Verifiable Credential.
getCredentialNFTFromLocator(String locator, {CrossmintCredentialCollectionProvider? collectionProvider, Future<Object?> metadataLoader(CrossmintCredentialLocator locator)?}) Future<CrossmintCredentialNftLookupResult>
getCredentialNfts(CrossmintVcChain chain, String wallet, {required CrossmintWalletCredentialNftProvider walletNftsProvider, required CrossmintCredentialCollectionProvider collectionProvider, CrossmintCredentialFilter filter = const CrossmintCredentialFilter()}) Future<List<CrossmintCredentialsCollection>>
ipfsRetrievalProcedure({CrossmintCredentialDocumentLoader? documentLoader}) CrossmintCredentialRetrievalProcedure
isCredentialType(Object? value) bool
isEncryptedVerifiableCredential(Object? value) bool
isVcChain(String chain) bool
isVerifiableCredential(Object? value) bool
parseCredentialLocator(String locator) CrossmintCredentialLocator
recoverEthereumAddress(Uint8List messageHash, Uint8List signature) String?
Recovers an Ethereum address from a secp256k1 signature and message hash.
tryParseCredentialType(Object? value) CrossmintCredentialType?
tryParseEncryptedVerifiableCredential(Object? value) CrossmintEncryptedVerifiableCredential?
tryParseVcIssuer(Object? value) CrossmintVcIssuer?
tryParseVcNft(Object? value) CrossmintVcNft?
tryParseVerifiableCredential(Object? value) CrossmintVerifiableCredential?
verifyCredential(CrossmintVerifiableCredential credential, {CrossmintCredentialProofVerifier? proofVerifier, CrossmintCredentialRevocationChecker? revocationChecker, DateTime? now}) Future<CrossmintCredentialVerificationResult>
verifyEip712Proof(CrossmintVerifiableCredential credential) bool
Backward-compatible boolean wrapper for verifyEip712ProofDetailed.
verifyEip712ProofDetailed(CrossmintVerifiableCredential credential) Eip712VerificationResult
Verifies an EIP-712 typed data signature on a Verifiable Credential.

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.