komodo_defi_local_auth 0.3.1+2 copy "komodo_defi_local_auth: ^0.3.1+2" to clipboard
komodo_defi_local_auth: ^0.3.1+2 copied to clipboard

A package responsible for managing and abstracting out an authentication service on top of the API's methods

Komodo DeFi Local Auth #

Authentication and wallet management on top of the Komodo DeFi Framework. This package powers the KomodoDefiSdk.auth surface and can be used directly for custom flows.

License: MIT

Install #

dart pub add komodo_defi_local_auth

Getting started #

import 'package:komodo_defi_framework/komodo_defi_framework.dart';
import 'package:komodo_defi_local_auth/komodo_defi_local_auth.dart';

final framework = KomodoDefiFramework.create(
  hostConfig: LocalConfig(https: false, rpcPassword: 'your-secure-password'),
);

final auth = KomodoDefiLocalAuth(
  kdf: framework,
  hostConfig: LocalConfig(https: false, rpcPassword: 'your-secure-password'),
);
await auth.ensureInitialized();

// Register or sign in (HD wallet by default)
await auth.register(walletName: 'my_wallet', password: 'strong-pass');

API highlights #

  • signIn / register (+ signInStream / registerStream for progress and HW flows)
  • authStateChanges and watchCurrentUser()
  • currentUser, getUsers(), signOut()
  • Mnemonic management: getMnemonicEncrypted(), getMnemonicPlainText(), updatePassword()
  • Wallet admin: deleteWallet(...)
  • Trezor flows (PIN entry etc.) via streaming API

HD is enabled by default via AuthOptions(derivationMethod: DerivationMethod.hdWallet). Override if you need legacy (Iguana) mode.

With the SDK #

Prefer using KomodoDefiSdk which wires and scopes auth, assets, balances, and the rest for you:

final sdk = KomodoDefiSdk();
await sdk.initialize();
await sdk.auth.signIn(walletName: 'my_wallet', password: 'pass');

License #

MIT

0
likes
130
points
4
downloads

Publisher

verified publisherkomodoplatform.com

Weekly Downloads

A package responsible for managing and abstracting out an authentication service on top of the API's methods

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_bloc, flutter_secure_storage, freezed_annotation, komodo_defi_framework, komodo_defi_rpc_methods, komodo_defi_types, local_auth, logging, mutex, uuid

More

Packages that depend on komodo_defi_local_auth