crossmint_wallets 0.2.0
crossmint_wallets: ^0.2.0 copied to clipboard
Pure-Dart wallet primitives for the Crossmint Flutter SDK — wallet models, signer abstractions, and API contracts.
0.2.0 #
CrossmintWalletsClient.addSignerand.removeSignergained an optionalapproverparameter, naming the recovery method that authorizes the operation. Breaking change for anyone implementingCrossmintWalletsClientdirectly — add the parameter to your implementation. Threaded throughDefaultCrossmintWalletsClient,WalletsApiService.unregisterSigner, and the signer registration/removal serialization.CrossmintWalletCreateRequestgained a second constructor,.withRecoveryMethods, taking the fullrecoveryMethodslist. The two constructors are mutually exclusive: the default one takes a singlerecovery, the new one takes the list.recoveryMethodsandrecovery(the first entry) are readable off either. Mirrors the pairedcreateWalletoverloads in the Swift and Kotlin SDKs.- The wire form follows the constructor, not the list length. The default
constructor sends
config.adminSignerand works on every chain;.withRecoveryMethodssendsconfig.recoveryMethodson Solana and Stellar. On another chain a one-entry list goes out asconfig.adminSigner, and a longer list throwsCrossmintWalletException(walletInvalidChain)client-side instead of reaching the backend's HTTP 501. This matchesRecoveryInputin the Swift SDK andRecoveryConfigin Kotlin. CrossmintWalletCreateRequest.withResolvedSignersrebuilds a request with resolved signers through the same constructor, so the wire form survives the controller's email and device-signer resolution.usesRecoveryMethodListreports which form a request holds.CrossmintWallets.createWalletWithRecoveryMethodsis the facade entry point for the list form;createWalletkeeps its single-recoverysignature.- New error code
CrossmintErrorCode.walletMissingRecoveryMethod, thrown as aCrossmintWalletExceptionwhen a request carries no recovery method at all. It is anExceptionrather than theStateErroran empty list would otherwise raise, so calleron Exceptionhandlers catch it instead of leaving the operation stranded in progress. - Fixed: the
approveris trimmed before it is sent. The registration body and theunregisterSignerquery string used to carry the raw string, and a whitespace-only approver is now dropped instead of sent as" ". - Requires
crossmint_core ^0.1.7.
0.1.5 #
- Added
CrossmintOtpDeliveryChannel(sms,whatsapp) andCrossmintPhoneSignerConfig.channelto request the OTP delivery channel for phone signers. Null means the service default, SMS. The channel is client-only: it is not serialized into wallet API requests and is not parsed back from a fetched wallet's recovery config. - The
onSignWithPasskeydartdoc now states that assertions must be requested withuserVerification: "required".
0.1.4 #
- Added
deployImmediatelytoaddSigner, defaulting totrue. On EVM wallets it controls how the backend registers the signer:truereturns an on-chain registration transaction installed immediately,falsekeeps the lazy signature-request flow. The flag is never sent for Solana or Stellar wallets. - EVM signer registration requests changed shape. The registration payload
now always carries
deployImmediatelyon EVM, where the key was previously absent, so existing callers that pass nothing now sendtrueexplicitly. PassdeployImmediately: falseto keep the lazy signature-request flow. - EVM registration responses are parsed differently. The parser now
branches by chain family: on EVM it reads the transaction id from the
chain entry's
onChainblock, and a registration carryingonChainno longer yields a pending signature id. Solana and Stellar keep the previous pending-transaction path. Callers that read the returned signature id on EVM should read the transaction id instead. - The exception raised for an unsupported device signer now reads
Device signers are not supported for this wallet.instead of... for this wallet's provider., and the matching dartdoc was reworded. The error code (CrossmintErrorCode.walletDeviceSignerNotSupported) is unchanged; only the default message text differs.
0.1.3 #
- Solana device signers are no longer rejected client-side. Device signer registration is serialized and sent for all chains; support is provider-dependent (Swig/Crossmint support it, Squads does not) and validated server-side.
registerSignernow maps the backendDEVICE_SIGNER_NOT_SUPPORTEDcode to a typedCrossmintWalletException(walletDeviceSignerNotSupported), recognized from the response body regardless of HTTP status.- Requires
crossmint_core ^0.1.4for the newCrossmintErrorCode.walletDeviceSignerNotSupported. - Removed the
permissionless_passkeysdependency (passkey factory moved to a host-supplied/callback path in the umbrella SDK).
0.1.2 #
- Docs: expanded dartdoc coverage on the public surface for the pub.flutter-io.cn
landing page, plus a follow-up pass that fixed broken
[reference]link targets and dartdoc format regressions surfaced by the docs build.
0.1.1 #
- Aligned
WalletSerializationCodec.serializeDelegatedSignerwith the EVM OpenAPI schema for email and phone signers — it now emits the full{type, email|phone}object instead of a bareemail:/phone:locator string, matchingserializeSignerRegistrationInputand the RN SDK. Forward-compat only — no end-user behavior change in this release: the Crossmint backend does not currently accept email or phone as delegated signer types on EVM, so wallet creation withsigners: [CrossmintEmailSignerConfig(...)]/CrossmintPhoneSignerConfig(...)continues to fail with HTTP 400. Tracking the backend-side addition separately. See #21 / #24.
0.1.0 #
- First public release on pub.flutter-io.cn
0.0.1 #
- Initial internal extraction from
crossmint_flutter - Added wallet domain contracts, models, API service, and signer abstractions
- Added internal default wallet repository export for monorepo wiring