Accounts class
A usecase that handles accounts
Constructors
Properties
-
accounts
→ Map<
String, Account> -
pubKey -> Account
final
- cannotSign → bool
-
no setter
- canSign → bool
-
is currently logged in account able to sign events
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLoggedIn → bool
-
is logged in
no setter
- isNotLoggedIn → bool
-
is not logged in
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAccount(
{required String pubkey, required AccountType type, required EventSigner signer}) → void - adds an Account
-
getLoggedAccount(
) → Account? - returns currently logged in account
-
getPublicKey(
) → String? - returns public key of currently logged in account or null if not logged in
-
hasAccount(
String pubkey) → bool - do we have the account for this pubkey?
-
loginExternalSigner(
{required EventSigner signer}) → void - adds a new read-only Account and sets the logged pubkey
-
loginPrivateKey(
{required String pubkey, required String privkey}) → void - adds a new Account and sets the logged pubkey
-
loginPublicKey(
{required String pubkey}) → void - adds a new read-only Account and sets the logged pubkey
-
loginWithBunkerConnection(
{required BunkerConnection connection, required Bunkers bunkers, dynamic authCallback(String)?}) → Future< void> -
loginWithBunkerUrl(
{required String bunkerUrl, required Bunkers bunkers, dynamic authCallback(String)?}) → Future< BunkerConnection?> -
loginWithNostrConnect(
{required NostrConnect nostrConnect, required Bunkers bunkers, dynamic authCallback(String)?}) → Future< BunkerConnection?> -
logout(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAccount(
{required String pubkey}) → void - removes an Account
-
sign(
Nip01Event event) → Future< void> - low-level method, should not be used directly in most cases, use broadcast instead which calls signing on the signer
-
switchAccount(
{required String pubkey}) → void - set logged account
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited