forked from trent_larson/crowd-funder-for-time-pwa
refactor DB organization (prepping for more tables)
This commit is contained in:
@@ -65,7 +65,7 @@ export const deriveAddress = (
|
||||
*
|
||||
* @return {*} {string}
|
||||
*/
|
||||
export const createIdentifier = (): string => {
|
||||
export const generateSeed = (): string => {
|
||||
const entropy: Uint8Array = getRandomBytesSync(32);
|
||||
const mnemonic = entropyToMnemonic(entropy, wordlist);
|
||||
|
||||
@@ -87,9 +87,9 @@ export const accessToken = async (identifier: IIdentifier) => {
|
||||
const nowEpoch = Math.floor(Date.now() / 1000);
|
||||
const endEpoch = nowEpoch + 60; // add one minute
|
||||
|
||||
const uportTokenPayload = { exp: endEpoch, iat: nowEpoch, iss: did };
|
||||
const tokenPayload = { exp: endEpoch, iat: nowEpoch, iss: did };
|
||||
const alg = undefined; // defaults to 'ES256K', more standardized but harder to verify vs ES256K-R
|
||||
const jwt: string = await didJwt.createJWT(uportTokenPayload, {
|
||||
const jwt: string = await didJwt.createJWT(tokenPayload, {
|
||||
alg,
|
||||
issuer: did,
|
||||
signer,
|
||||
|
||||
Reference in New Issue
Block a user