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>PrivateKey

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 PrivateKey
import { PrivateKey } from "https://deno.land/x/lucid@0.5.2/src/core/wasm_modules/cardano-multiplatform-lib-web/cardano_multiplatform_lib.d.ts";

Methods

as_bytes(): Uint8Array
free(): void
sign(message: Uint8Array): Ed25519Signature
to_bech32(): string

Static Methods

from_bech32(bech32_str: string): PrivateKey

Get private key from its bech32 representation

PrivateKey.from_bech32('ed25519_sk1ahfetf02qwwg4dkq7mgp4a25lx5vh9920cr5wnxmpzz9906qvm8qwvlts0');

For an extended 25519 key

PrivateKey.from_bech32('ed25519e_sk1gqwl4szuwwh6d0yk3nsqcc6xxc3fpvjlevgwvt60df59v8zd8f8prazt8ln3lmz096ux3xvhhvm3ca9wj2yctdh3pnw0szrma07rt5gl748fp');
from_extended_bytes(bytes: Uint8Array): PrivateKey
from_normal_bytes(bytes: Uint8Array): PrivateKey