Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/lucid/src/core/wasm_modules/cardano-multiplatform-lib-web/cardano_multiplatform_lib.d.ts>PublicKey

Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.
Very Popular
Go to Latest
class PublicKey
import { PublicKey } from "https://deno.land/x/lucid@0.5.2/src/core/wasm_modules/cardano-multiplatform-lib-web/cardano_multiplatform_lib.d.ts";

ED25519 key used as public key

Methods

as_bytes(): Uint8Array
free(): void
to_bech32(): string
verify(data: Uint8Array, signature: Ed25519Signature): boolean

Static Methods

from_bech32(bech32_str: string): PublicKey

Get public key from its bech32 representation Example:

const pkey = PublicKey.from_bech32('ed25519_pk1dgaagyh470y66p899txcl3r0jaeaxu6yd7z2dxyk55qcycdml8gszkxze2');
from_bytes(bytes: Uint8Array): PublicKey