Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lucid/src/mod.ts>C.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.
Go to Latest
class C.PrivateKey
import { C } from "https://deno.land/x/lucid@0.10.6/src/mod.ts";
const { PrivateKey } = C;

Static Methods

__wrap(ptr)
from_bech32(bech32_str)

Get private key from its bech32 representation

PrivateKey.from_bech32('ed25519_sk1ahfetf02qwwg4dkq7mgp4a25lx5vh9920cr5wnxmpzz9906qvm8qwvlts0');

For an extended 25519 key

PrivateKey.from_bech32('ed25519e_sk1gqwl4szuwwh6d0yk3nsqcc6xxc3fpvjlevgwvt60df59v8zd8f8prazt8ln3lmz096ux3xvhhvm3ca9wj2yctdh3pnw0szrma07rt5gl748fp');
from_bytes(bytes)