Socket
Socket
Sign inDemoInstall

@tkey/seed-phrase

Package Overview
Dependencies
74
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tkey/seed-phrase

TKey Seed Phrase Module


Version published
Weekly downloads
138
increased by81.58%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

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.

FAQs

Last updated on 08 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc