Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions infrastructure/eid-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"license": "MIT",
"dependencies": {
"@auvo/tauri-plugin-crypto-hw-api": "^0.1.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@ngneat/falso": "^7.3.0",
Expand Down
1 change: 1 addition & 0 deletions infrastructure/eid-wallet/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ thiserror = { version = "2.0.11" }
[target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies]
tauri-plugin-barcode-scanner = "2"
tauri-plugin-biometric = "2.2.0"
tauri-plugin-crypto-hw = "0.1.0"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<script lang="ts">
import { goto } from "$app/navigation";
import { Hero } from "$lib/fragments";
import { ButtonAction, Drawer } from "$lib/ui";
import { getContext, onMount } from "svelte";
import { GlobalState } from "$lib/global";
import axios from "axios";
import { v4 as uuidv4 } from "uuid";
import {
PUBLIC_PROVISIONER_URL,
PUBLIC_REGISTRY_URL,
} from "$env/static/public";
import { Hero } from "$lib/fragments";
import { GlobalState } from "$lib/global";
import { ButtonAction, Drawer } from "$lib/ui";
import { capitalize } from "$lib/utils";
import {
generate, getPublicKey,
// signPayload, verifySignature
} from "@auvo/tauri-plugin-crypto-hw-api"
import * as falso from "@ngneat/falso";
import axios from "axios";
import { getContext, onMount } from "svelte";
import { Shadow } from "svelte-loading-spinners";
import { v4 as uuidv4 } from "uuid";

let isPaneOpen = $state(false);
let preVerified = $state(false);
Expand Down Expand Up @@ -41,6 +45,31 @@
return randomLetters() + randomDigits();
}

// IMO, call this function early, check if hardware even supports the app
// docs: https://github.com/auvoid/tauri-plugin-crypto-hw/blob/48d0b9db7083f9819766e7b3bfd19e39de9a77f3/examples/tauri-app/src/App.svelte#L13
async function generateApplicationKeyPair() {
let res: string | undefined
try {
res = await generate("default")
console.log(res)
} catch (e) {
// Put hardware crypto missing error here
console.log(e)
}
return res
}

async function getApplicationPublicKey() {
let res: string | undefined
try {
res = await getPublicKey("default")
console.log(res)
} catch (e) {
console.log(e)
}
return res // check getPublicKey doc comments (multibase hex format)
}

const handleNext = async () => {
//handle next functionlity
goto("/verify");
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading