Skip to main content
Module

x/earthstar/mod.ts>ICrypto

A specification and Javascript library for building online tools you can truly call your own.
Go to Latest
interface ICrypto
Re-export
import { type ICrypto } from "https://deno.land/x/earthstar@v9.3.3/mod.ts";

Higher-level crypto functions. Not used directly for the most part, but useful for generating new keypairs.

Methods

sha256base32(input: string | Uint8Array): Promise<Base32String>
generateAuthorKeypair(name: string): Promise<AuthorKeypair | ValidationError>
sign(keypair: AuthorKeypair, msg: string | Uint8Array): Promise<Base32String | ValidationError>
verify(
authorAddress: AuthorAddress,
msg: string | Uint8Array,
): Promise<boolean>
checkAuthorKeypairIsValid(keypair: AuthorKeypair): Promise<true | ValidationError>