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

@exodus/address-provider

Package Overview
Dependencies
Maintainers
0
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/address-provider

Address provider for deriving and tracking used and unused addresses.

  • 10.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
917
decreased by-56.83%
Maintainers
0
Weekly downloads
 
Created
Source

@exodus/address-provider

This module is a gateway that delegates to registered address providers based on WalletAccount source.

flowchart LR
    A[Wallet] -->|getReceiveAddress\ngetChangeAddress\n...| B(AddressProvider)
    B --> C{Pick by \nsource}
    C -->|trezor| D[TrezorAddressProvider]
    C -->|exodus| E[SeedAddressProvider]
    C -->|ftx| F[FtxAddressProvider]

Install

yarn add @exodus/address-provider

Usage

import addressProviderDefinition from '@exodus/address-provider'

ioc.registerMultiple([
  {
    id: 'getAddressProvider',
    factory:
      ({ seedAddressProvider }) =>
      ({ walletAccount }) => {
        if (walletAccount.source === WalletAccount.EXODUS_SRC) {
          return seedAddressProvider
        }

        throw new Error(
          `No address provider available for wallet account source ${walletAccount.source}`
        )
      },
  },
  addressProviderDefinition,
])

const { addressProvider } = ioc.getAll()

const defaultAddress = await addressProvider.getAddress({
  purpose, // Number, e.g. 44 for BIP 44, 84 for BIP84, etc
  assetName,
  walletAccount: walletAccountInstance,
  chainIndex: 0,
  addressIndex: 0,
})
// ...

FAQs

Package last updated on 08 Mar 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