Skip to main content
Module

x/earthstar_replica_server/deps.ts>Earthstar.ICrypto

An always-online Earthstar peer for your shares.
Latest
interface Earthstar.ICrypto
Re-export
import { type Earthstar } from "https://deno.land/x/earthstar_replica_server@4.0.0-beta.1/deps.ts";
const { ICrypto } = Earthstar;

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

Methods

sha256base32(input: string | Uint8Array): Promise<Base32String>
updatableSha256(): UpdatableHash<any>
generateAuthorKeypair(name: string): Promise<AuthorKeypair | ValidationError>
generateShareKeypair(name: string): Promise<ShareKeypair | ValidationError>
sign(keypair: AuthorKeypair | ShareKeypair, msg: string | Uint8Array): Promise<Base32String | ValidationError>
verify(
msg: string | Uint8Array,
): Promise<boolean>
checkKeypairIsValid(keypair: AuthorKeypair | ShareKeypair): Promise<true | ValidationError>