12.1.0 • Published 1 month ago

@tkey/seed-phrase v12.1.0

Weekly downloads
47
License
MIT
Repository
github
Last release
1 month ago

tKey Seed Phrase Module

npm version minzip

The tKey Seed Phrase Module helps you add or remove the and password as a share for tkey. This module is the part of the tKey SDK.

Installation

npm install --save @tkey/seed-phrase

Initialization

Import the SeedPhraseModule class from @tkey/seed-phrase

import SeedPhraseModule from "@tkey/seed-phrase";

Assign the SeedPhraseModule class to a variable

const seedPhraseModule = new SeedPhraseModule();

Returns

The SeedPhraseModule class returns an object with the following properties:

declare class SeedPhraseModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  seedPhraseFormats: ISeedPhraseFormat[];
  constructor(formats: ISeedPhraseFormat[]);
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  setSeedPhrase(seedPhraseType: string, seedPhrase?: string): Promise<void>;
  setSeedPhraseStoreItem(partialStore: ISeedPhraseStore): Promise<void>;
  CRITICAL_changeSeedPhrase(oldSeedPhrase: string, newSeedPhrase: string): Promise<void>;
  getSeedPhrases(): Promise<ISeedPhraseStore[]>;
  getSeedPhrasesWithAccounts(): Promise<ISeedPhraseStoreWithKeys[]>;
  getAccounts(): Promise<BN[]>;
}

Usage

With the SeedPhraseModule, you've access to the following functions:

Set Seed Phrase

setSeedPhrase(seedPhraseType: string, seedPhrase?: string)

  • seedPhraseType: The type of seed phrase to set.
  • seedPhrase: The seed phrase to set.

Set Seed Phrase Store Item

setSeedPhraseStoreItem(partialStore: ISeedPhraseStore)

  • partialStore: The partial store to set.

Get Seed Phrase

getSeedPhrases()

Return

  • Promise<ISeedPhraseStore[]>: A list of seed phrases.

Get Seed Phrase With Accounts

getSeedPhrasesWithAccounts()

Return

  • Promise<ISeedPhraseStoreWithKeys[]>: A list of seed phrases with accounts.
12.1.0

1 month ago

10.0.0

10 months ago

12.0.0

7 months ago

11.0.2

9 months ago

11.0.3

8 months ago

11.0.0

9 months ago

11.0.1

9 months ago

10.1.0

10 months ago

8.1.0-alpha.0

1 year ago

9.0.0

1 year ago

7.4.0

1 year ago

7.3.0

1 year ago

8.0.5-alpha.0

1 year ago

8.0.7-alpha.0

1 year ago

8.0.6-alpha.0

1 year ago

8.0.0-alpha.0

1 year ago

7.2.0

1 year ago

7.1.0

1 year ago

6.1.0

2 years ago

6.2.0

2 years ago

7.0.0

2 years ago

6.0.0

2 years ago

5.1.4

2 years ago

5.1.3

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

4.4.0-alpha.0

3 years ago

4.4.0-y.0

3 years ago

4.4.0-alpha.4

3 years ago

4.4.0-alpha.3

3 years ago

4.4.0-alpha.2

3 years ago

4.4.0-alpha.1

3 years ago

4.4.0

3 years ago

4.3.0

3 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.1

3 years ago

4.1.0

3 years ago

4.0.1

3 years ago

4.0.2

3 years ago

3.14.1

3 years ago

3.14.2

3 years ago

4.0.0

3 years ago

3.13.2

3 years ago

3.14.0

3 years ago

3.12.1

3 years ago

3.12.0

3 years ago

3.11.1

3 years ago

3.11.0

3 years ago

3.10.0

3 years ago

3.9.1

3 years ago

3.9.0

3 years ago

3.8.0

3 years ago

3.7.0

3 years ago

3.6.5

3 years ago

3.6.2

3 years ago

3.6.3

3 years ago

3.6.1

3 years ago

3.6.0

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.2.2

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago