Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@herond/tkey

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@herond/tkey

ShareA is stored on the user’s device ShareB is managed and split across Web3Auth's Auth Network ShareC is a recovery share

  • 1.0.37
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ShareA is stored on the user’s device ShareB is managed and split across Web3Auth's Auth Network ShareC is a recovery share

Usage

import HerondTKey from '@herond/tkey'

const _tKey = new HerondTKey({
    enableLogging: true,
    clientId: 'BHSdp-IiAoEUV6fpvMFZL12WNk0cXKx0-EKdeJBdVCMtG2LBFED-ice9-0xUnwd4o09Qj7PGnidBJJNqXWt4eU4',
    hostUrl: 'https://metadata.tor.us',
    network: 'testnet',
    networkUrl: 'https://small-long-brook.ropsten.quiknode.pro/e2fd2eb01412e80623787d1c40094465aa67624a',
    verifier: 'herond-jwt',
})

res = await tKey.login({
    idToken,
    deviceShare
})

Methods:

MethodsParamsResponse
loginRequest login to torus network, response shareB if succeed{idToken, inputShare?}LoginResponse{succeed, code, shareDevice, shareEmail}
loginUsingRecoveryShareNeed trigger "login" once before run this method, this method does not call to torus network, it simply try to reconstruct key using shareB from previous step and an input share, this can be use to generate new device share{idToken, inputShare, createDeviceShare}LoginResponse{succeed, code, shareDevice, shareEmail}
getSeedPhrasesGet seed phrases from storageISeedPhraseStore[]
generateSeedPhraseGenerate new seed phrase with type HD Key Tree{newSeedPhrase: ISeedPhraseStore, seedPhrases: ISeedPhraseStore[]}
setSeedPhraseAdd seed phrase to storageseedPhraseType: string, seedPhrase: string{newSeedPhrase: ISeedPhraseStore, seedPhrases: ISeedPhraseStore[]}
deleteSeedPhraseDelete a seed phrase from storageseedPhrase: stringISeedPhraseStore[]
migrateSeedPhraseMerge list of seed phrase with existed in storageseedPhrase: string{newSeedPhrase: ISeedPhraseStore, seedPhrases: ISeedPhraseStore[]}
getPrivateKeysGet additional private keys from storageIPrivateKeyStorage[]
setPrivateKeyAdd additional private keys to storage{newPrivateKey:IPrivateKeyStorage, privateKeys:IPrivateKeyStorage[]}
deletePrivateKeyDelete a seed phrase from storageprivateKeyType: string, privateKey: stringIPrivateKeyStorage[]
requestShareTransferRequest new share transfer sessioncurrentEncPubKeyX: string
getShareTransferFromApprovalGet share after approval successfullycurrentEncPubKeyX: stringshare: string
getPendingShareTransferRequestsGet list of pendding share transfer requestsShareTransferStore[]
approveShareTransferApprove a share transfer requestencPubKeyX: string, userAgent: string

FAQs

Package last updated on 09 Jun 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc