Skip to main content
Module

x/lucid/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.
Very Popular
Go to Latest
class C.PrivateKey
import { C } from "https://deno.land/x/lucid@0.10.6/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)