New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@exodus/key-utils

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/key-utils

Utilities to manage derivation paths and key identifier aspects.

  • 3.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
decreased by-99.28%
Maintainers
0
Weekly downloads
 
Created
Source

@exodus/key-utils

Utilities to manage derivation paths and key identifier aspects.

Usage

assertKeyIdentifierParameters can be used to verify that getKeyIdentifer is supplied with the right arguments.

import { assertKeyIdentifierParameters } from '@exodus/key-utils'

export function createGetKeyIdentifier({
  bip44,
  assetName,
  derivationAlgorithm = 'BIP32',
  keyType = 'secp256k1',
}) {
  return (params = {}) => {
    params = { accountIndex: 0, addressIndex: 0, chainIndex: 0, ...params }
    assertKeyIdentifierParameters(params)

    // ...
  }
}

This library also comes with a getKeyIdentifier factory, that is configurable and should be able to fit most assets needs:

const getKeyIdentifier = createGetKeyIdentifier({
  bip44: assets.solana.bip44,
  validationRules: { allowedChainIndices: [0, 1] },
})

// or for assets that support purpose 84, 86 as well
const getKeyIdentifier = createGetKeyIdentifier({
  bip44: assets.bitcoin.bip44,
  validationRules: { allowedChainIndices: [0, 1], allowedPurposes: [44, 84, 86] },
})

FAQs

Package last updated on 03 Oct 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc