Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AudiusProject/hedgehog
/ functions
Functions
42 in github.com/AudiusProject/hedgehog
⨍
Functions
42
◇
Types & classes
6
↓ 8 callers
Method
createWalletObj
* Create a new client side wallet object without going through the signup flow. This is useful * if you need a temporary, read-only wallet that is
src/Hedgehog.ts:368
↓ 6 callers
Method
createAuthLookupKey
( username: string, password: string, createKey: CreateKey )
src/WalletManager.ts:73
↓ 6 callers
Method
getEntropyFromLocalStorage
(localStorage: LocalStorage)
src/WalletManager.ts:87
↓ 6 callers
Method
getWallet
* Returns the current user wallet * @returns ethereumjs-wallet wallet object if a wallet exists, otherwise null
src/Hedgehog.ts:342
↓ 6 callers
Method
isLoggedIn
* Returns is the user has a client side wallet. If they do, calls can be made against * that wallet, if they don't the user has to login or signup
src/Hedgehog.ts:334
↓ 6 callers
Method
setEntropyInLocalStorage
( entropy: string, localStorage: LocalStorage )
src/WalletManager.ts:112
↓ 5 callers
Method
deleteEntropyFromLocalStorage
(localStorage: LocalStorage)
src/WalletManager.ts:119
↓ 4 callers
Method
confirmCredentials
* Confirms the user credentials given generate the same entropy after using artifacts from the server * @param username username * @param passwo
src/Hedgehog.ts:286
↓ 4 callers
Function
createKey
(encryptStr: string, ivHex: string)
src/utils.ts:61
↓ 4 callers
Method
decryptCipherTextAndRetrieveWallet
( password: string, ivHex: string, cipherTextHex: string, createKey: CreateKey )
src/WalletManager.ts:52
↓ 4 callers
Method
generateWalletFromEntropy
* Given an entropy string and a HD wallet path, return the wallet address * @param entropy Hex string generated by generateMnemonicAndEntropy()
src/Authentication.ts:31
↓ 4 callers
Method
login
* Given user credentials, attempt to get authentication artifacts from server using * getFn, create the private key using the artifacts and the use
src/Hedgehog.ts:251
↓ 4 callers
Function
setDataInDB
(auth, user)
tests/hedgehogTest.js:37
↓ 3 callers
Function
bufferFromHexString
(hexString: string)
src/utils.ts:5
↓ 3 callers
Method
decrypt
* Given an iv buffer, key buffer and ciphertext, decrypt the plaintext value of the entropy * @param ivBuffer Buffer version of iv * @param keyB
src/Authentication.ts:93
↓ 3 callers
Function
getPlatformCreateKey
()
src/utils.ts:55
↓ 3 callers
Method
getWalletObjFromLocalStorageIfExists
( localStorage: LocalStorage )
src/WalletManager.ts:97
↓ 3 callers
Method
logout
* Deletes the local client side wallet including entropy and all associated * authentication artifacts
src/Hedgehog.ts:324
↓ 3 callers
Method
restoreLocalWallet
* If a user refreshes or navigates away from the page and comes back later, this attempts * to restore the client side wallet from localStorage, if
src/Hedgehog.ts:352
↓ 2 callers
Method
createIV
* Generate a 16 byte initialization vector and returns it as both a hex string and a buffer
src/Authentication.ts:59
↓ 2 callers
Method
encrypt
* Given a iv buffer and key buffer, generate a ciphertext * @param entropy Hex string of entropy * @param ivBuffer Buffer version of iv * @pa
src/Authentication.ts:72
↓ 2 callers
Method
generateMnemonicAndEntropy
* Creates a random mnemonic and creates an entropy string from the mnemonic * @returns `{mnemonic: '...mnemonic string...', entropy: '47b0e5e107ccc
src/Authentication.ts:47
↓ 2 callers
Function
isNodeEnv
()
src/utils.ts:51
↓ 2 callers
Function
isWebEnv
()
src/utils.ts:42
↓ 2 callers
Function
resetDataInDB
()
tests/hedgehogTest.js:33
↓ 1 callers
Function
WebWorker
(worker: Worker)
src/utils.ts:12
↓ 1 callers
Function
createEncryptBuffer
* This prepends the encryptPrefixStr to the entropy, converts it to a buffer and returns the buffer * @param entropy hex string of entropy * @return
src/Authentication.ts:114
↓ 1 callers
Function
createKey
(encryptStr, ivHex)
src/authWorker.js:16
↓ 1 callers
Function
getPlatformLocalStorage
()
src/utils.ts:23
↓ 1 callers
Function
isReactNativeEnv
()
src/utils.ts:36
↓ 1 callers
Method
isReady
* Helper function to check if Hedgehog instance is ready. * Only needed if `useLocalStorage = true` * Otherwise, Hedgehog will be ready as soon
src/Hedgehog.ts:64
↓ 1 callers
Method
signUp
* Given user credentials, create a client side wallet and all other authentication artifacts, * call setFn to persist the artifacts to a server and
src/Hedgehog.ts:84
↓ 1 callers
Function
verifyDecryptString
* This converts the buffer returned by the `decrypt` function to string, checks that the * integrity of the string to check if the encryptPrefixStr e
src/Authentication.ts:126
↓ 1 callers
Function
waitUntil
(condition: () => boolean)
src/utils.ts:112
Method
changePassword
* Generate new set of auth credentials to allow login and remove the old password * Note: Doesn't log out on error * @param username - username
src/Hedgehog.ts:190
Method
constructor
( getFn?: GetFn, setAuthFn?: SetAuthFn, setUserFn?: SetUserFn, useLocalStorage = true, loc
src/Hedgehog.ts:25
Method
createWalletObj
( password: string, entropyOverride: string | null = null, localStorage: LocalStorage, createK
src/WalletManager.ts:15
Function
getFn
(obj)
tests/hedgehogTest.js:20
Method
resetPassword
* Generate new set of auth credentials to allow login * If the old password is included, the setAuthFn will include the old lookup key for deletion
src/Hedgehog.ts:139
Function
setAuthFn
(obj)
tests/hedgehogTest.js:25
Function
setUserFn
(obj)
tests/hedgehogTest.js:29
Method
waitUntilReady
* Helper function to wait until Hedgehog instance is ready. * Only needed if `useLocalStorage = true` * Otherwise, Hedgehog will be ready as soo
src/Hedgehog.ts:73