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

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

Get public key from its bech32 representation Example:

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

Parameters

bech32_str