Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "account"

Index

Functions

address

  • address(): Promise<string>
  • Get the account address.

    const address = Textile.account.address();

    Returns Promise<string>

cancelSync

  • cancelSync(): Promise<void>
  • Cancel an ongoing Thread backup search.

    Textile.account.cancelSync();

    Returns Promise<void>

contact

  • contact(): Promise<IContact>
  • List all own contact.

    const contact: IContact = Textile.account.contact();

    Returns Promise<IContact>

decrypt

  • decrypt(input: Buffer): Promise<Buffer>
  • Decrypt data previously encrypted with the account address.

    const decrypted = Textile.account.decrypt(encrypted);

    Parameters

    • input: Buffer

    Returns Promise<Buffer>

encrypt

  • encrypt(input: Buffer): Promise<Buffer>
  • Encrypt data with the account address.

    const encrypted = Textile.account.encrypt(Buffer.from(JSON.stringify({foo:"bar"})));

    Parameters

    • input: Buffer

    Returns Promise<Buffer>

seed

  • seed(): Promise<string>
  • Get the account seed phrase to display to user.

    const seed = Textile.account.seed();

    Returns Promise<string>

sync

  • sync(options: IQueryOptions): Promise<string>
  • Search and apply account thread snapshots.

    Textile.account.sync(options);

    Parameters

    • options: IQueryOptions

    Returns Promise<string>