New structure

This commit is contained in:
Matthew Aaron Raymer
2022-12-14 17:06:16 +08:00
parent 0fa0936c59
commit c239906a96
12 changed files with 140 additions and 39 deletions

View File

@@ -172,7 +172,9 @@ import { useAccountStore } from "../store/account";
import { createIdentifier, deriveAddress, newIdentifier } from "../libs/crypto";
import { IIdentifier } from "@veramo/core";
import * as R from "ramda";
import { db } from "../libs/db";
import useDBAccounts from "@/use/useDBAccounts";
const { addAccount } = useDBAccounts();
@Options({
components: {},
@@ -221,15 +223,7 @@ export default class AccountViewView extends Vue {
UPORT_ROOT_DERIVATION_PATH
);
console.log(newId);
db.accounts.add({
did: address,
kid: newId.keys[0].kid,
kms: newId.keys[0].kms,
meta: "",
privateKeyHex: privateHex,
publicKeyHex: publicHex,
type: "Secp256k1",
});
addAccount("me", "you", "identity");
//appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... created new ID..."}))
accountStore.account = JSON.stringify(newId);
//appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... stored new ID..."}))