Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserProfile

All calls must go though the UserProfile. A newly created UserProfile is unlocked until lock() is called, which removes access to private key material. Once locked, a UserProfile cannot be unlocked anymore since the corresponding storage is not available anymore. Instead, re-create the UserProfile via the UserProfileController to get an unlocked UserProfile.

Hierarchy

  • UserProfile

Index

Constructors

constructor

Properties

createdAt

createdAt: ReadonlyDate

locked

locked: ValueAndUpdates<boolean>

wallets

wallets: ValueAndUpdates<keyof WalletInfo[]>

Methods

addWallet

appendSignature

createIdentity

getAllIdentities

  • getAllIdentities(): keyof Identity[]

getIdentities

  • getIdentities(id: WalletId): keyof Identity[]

getIdentityLabel

  • getIdentityLabel(identity: Identity): string | undefined

identityExists

  • Checks if an identity exists in the wallet with the given ID in the primary keyring

    Example usage

    This allows you to detect which accounts of an HD wallet have been created. Pseudocode

    identityExists("m/44'/234'/0'") == true
    identityExists("m/44'/234'/1'") == true
    identityExists("m/44'/234'/2'") == true
    identityExists("m/44'/234'/3'") == false
    // Shows that identities with account indices 0–2 have been created.

    Parameters

    Returns Promise<boolean>

lock

  • lock(): void

printableSecret

setIdentityLabel

  • setIdentityLabel(identity: Identity, label: string | undefined): void

setWalletLabel

  • setWalletLabel(walletId: WalletId, label: string | undefined): void

signTransaction

storeIn

Static deriveEncryptionKey

Static loadFrom

Generated using TypeDoc