diff options
| author | Adam Soltys <[email protected]> | 2026-02-03 13:46:15 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:34:01 -0800 |
| commit | 918f4b29bc66be343914fd4c9284375825c57fdf (patch) | |
| tree | 68f1b93ee8f1d60400988fd71231295ca886bad6 /src/routes/(app)/account/ark | |
| parent | 44f09f89eb8f69dbb9bba76e0a55125093e7ecc0 (diff) | |
| download | coinos-ui-918f4b29bc66be343914fd4c9284375825c57fdf.tar.gz coinos-ui-918f4b29bc66be343914fd4c9284375825c57fdf.zip | |
cleanup
Diffstat (limited to 'src/routes/(app)/account/ark')
| -rw-r--r-- | src/routes/(app)/account/ark/+page.svelte | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/(app)/account/ark/+page.svelte b/src/routes/(app)/account/ark/+page.svelte index 4036d140..6d16556c 100644 --- a/src/routes/(app)/account/ark/+page.svelte +++ b/src/routes/(app)/account/ark/+page.svelte @@ -3,13 +3,10 @@ import { tick, onMount } from "svelte"; import { t } from "$lib/translations"; import Spinner from "$comp/Spinner.svelte"; - import { encrypt } from "nostr-tools/nip49"; import { bytesToHex, randomBytes } from "@noble/hashes/utils"; - import { nip19 } from "nostr-tools"; import { hex } from "@scure/base"; import { focus, fail, post, copy } from "$lib/utils"; import { goto } from "$app/navigation"; - import { SingleKey, Wallet } from "@arkade-os/sdk"; import { arkServerUrl } from "$lib/ark"; let { data } = $props(); @@ -35,6 +32,8 @@ }); let generateKey = async () => { + const { nip19 } = await import("nostr-tools"); + const { SingleKey, Wallet } = await import("@arkade-os/sdk"); privateKey = bytesToHex(randomBytes(32)); nsec = nip19.nsecEncode(hex.decode(privateKey)); showNsec = false; @@ -70,6 +69,7 @@ try { // Encrypt the private key using NIP-49 + const { encrypt } = await import("nostr-tools/nip49"); let seed = await encrypt(hex.decode(privateKey), password); await post("/account", { name, seed, type, arkAddress }); |
