1.0.47 • Published 11 months ago

@herond/tkey v1.0.47

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

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
1.0.19

1 year ago

1.0.39

11 months ago

1.0.38

11 months ago

1.0.40

11 months ago

1.0.44

11 months ago

1.0.21

1 year ago

1.0.42

11 months ago

1.0.20

1 year ago

1.0.41

11 months ago

1.0.26

12 months ago

1.0.47

11 months ago

1.0.25

12 months ago

1.0.46

11 months ago

1.0.24

1 year ago

1.0.45

11 months ago

1.0.23

1 year ago

1.0.29

11 months ago

1.0.28

11 months ago

1.0.27

12 months ago

1.0.33

11 months ago

1.0.32

11 months ago

1.0.31

11 months ago

1.0.30

11 months ago

1.0.37

11 months ago

1.0.36

11 months ago

1.0.35

11 months ago

1.0.34

11 months ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago