npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@polymeshassociation/azure-signing-manager

v1.0.2

Published

Allows Azure key vault private keys to sign Polymesh SDK transactions

Downloads

31

Readme

js-semistandard-style semantic-release

Azure Signing Manager

The AzureSigningManager implements the Polymesh SDK signing manager interface. This allows Polymesh transactions to be signed with keys in an Microsoft Azure key vault. The keys must be "EC" type and use curve "P-256K". The signing manager will ignore any other type.

Usage

import { AzureSigningManager } from '@polymeshassociation/azure-signing-manager';
import { Polymesh } from '@polymeshassociation/polymesh-sdk';

// defaults to constructing `new DefaultAzureCredential()` for credential
const signingManager = new AzureSigningManager({
  keyVaultUrl: 'https://somekeyvault.vault.azure.net/',
});

const polymesh = await Polymesh.connect({
  nodeUrl,
  signingManager,
});

const newKey = await signingManager.createKey('myKey') // keys can be created in the Azure UI or CLI as well
console.log('created key with address: ', newKey.address) // address is the primary way of specifying public keys on Polymesh

Authorization

To authorize access to the key vault a DefaultAzureCredential will be created. By default it searches for a credential in this order:

  1. EnvironmentCredential
  2. WorkloadIdentityCredential
  3. ManagedIdentityCredential
  4. AzureCliCredential
  5. AzurePowerShellCredential
  6. AzureDeveloperCliCredential

More details about authorization can be found on the Azure Docs. Optionally, a credential can be passed instead.

The identity will need permission to read and to sign with the keys. In order for the createKey function to work then create permission will be required as well. At least one of the roles "Key Vault Crypto User" or "Key Vault Crypto Officer" should be assigned. There is more info in the official guide

Pricing Note (for HSM keys)

Storing many HSM keys can be pricy

First 250 keys	         $5 per key per month
From  251 – 1,500 keys	 $2.50 per key per month
From  1,501 – 4,000 keys $0.90 per key per month
4,001+ keys	             $0.40 per key per month
+ $0.15/10,000 transactions

Only actively used HSM protected keys (used in prior 30-day period)

Where as software protected keys are charged only the per transaction fee of $0.15/10,000.

See the pricing page for details.

If you need large amounts of keys for your use case please reach out via support to find the best key storage solution for your use case.