Socket
Book a DemoInstallSign in
Socket

@penumbra-zone/keys

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@penumbra-zone/keys

Tool to download proving keys for Penumbra

4.2.3
latest
npmnpm
Version published
Maintainers
3
Created
Source

@penumbra-zone/keys

This package contains cryptographic keys relevant to the Penumbra blockchain.

Exports

The default export is a JSON mapping of Penumbra Action names to their relevant key, necessary for building cryptographic proofs for those actions.

Individual keys are also exported at @penumbra-zone/keys/[key_name]_pk.bin.

Using with a bundler

You could configure your bundler to understand the exported key 'modules' as assets, or, if your bundler supports import.meta.resolve you can resolve the path and fetch it.

const fetchConvertPk = await fetch(import.meta.resolve('@penumbra-zone/keys/convert_pk.bin'));
const convertPk = new Uint8Array(await fetchConvertPk.arrayBuffer());

For a more generic technique, the root export maps action type names to the relevant key filename. Note that not every action has an associated proving key.

import { Action } from '@penumbra-zone/protobuf/penumbra/core/transaction/v1/transaction_pb';
import actionKeys from '@penumbra-zone/keys';

async function getActionProvingKey({ action }: Action) {
  const actionName = action.case;
  const keyName = actionKeys[actionName];
  if (keyName) {
    const fetchKey = await fetch(import.meta.resolve(keyName, '@penumbra-zone/keys'));
    const pk = new Uint8Array(await fetchKey.arrayBuffer());
    return pk;
  }
}

FAQs

Package last updated on 31 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.