Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bifrost-finance/metamask-polkadot-adapter

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bifrost-finance/metamask-polkadot-adapter

![](https://github.com/chainsafe/metamask-snap-polkadot/workflows/ci/badge.svg) ![](https://img.shields.io/github/license/chainsafe/metamask-snap-polkadot) ![](https://img.shields.io/badge/yarn-%3E%3D1.17.0-orange.svg?style=flat-square) ![Discord](https:/

  • 0.6.1
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
5
Weekly downloads
 
Created
Source

Metamask <> Bifrost snap adapter

Discord

Metamask <> Bifrost snap adapter is used to inject polkadot snap as web3 provider. It lists snap inside window.injectedWeb3[injectedSnapId](*) so it can be enabled using @polkadot/extension-dapp package.

*injectedSnapId default is "metamask-bifrost-snap"

For more details on polkadot snap itself see snap repo or read full polkadot snap documentation.

Usage

function enablePolkadotSnap(
  config?: SnapConfig,
  snapOrigin?: string,
  snapInstallationParams?: Record<SnapInstallationParamNames, unknown> = {}
): Promise<MetamaskPolkadotSnap>

Usage to inject snap in injectedWeb3 object

function initPolkadotSnap(
  {
    config?: SnapConfig,
    snapOrigin?: string,
    snapInstallationParams?: Record<SnapInstallationParamNames, unknown> = {}
  },
  injectedSnapId?: string
): Promise<MetamaskPolkadotSnap>

By providing config as argument it is possible to override default configurations.

Default config:

{
  networkName: 'bifrostPolkadot'
}

Configuration structure is shown below.

SnapConfig {
  networkName: SnapNetworks;
  wsRpcUrl?: string;
  addressPrefix?: number;
  unit?: UnitConfiguration;
}

SnapNetworks = "bifrostPolkadot" | "bifrostKusama";

UnitConfiguration {
  symbol: string;
  decimals: number;
  image?: string;
  customViewUrl?: string;
}

Keywords

FAQs

Package last updated on 27 Nov 2023

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