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

x/lucid/src/core/mod.ts>Core.PublicKey.from_bech32

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
method Core.PublicKey.from_bech32
import { Core } from "https://deno.land/x/lucid@0.8.6/src/core/mod.ts";
const { PublicKey } = Core;

Get public key from its bech32 representation Example:

const pkey = PublicKey.from_bech32('ed25519_pk1dgaagyh470y66p899txcl3r0jaeaxu6yd7z2dxyk55qcycdml8gszkxze2');

Parameters

bech32_str