Socket
Socket
Sign inDemoInstall

@subwallet-connect/blocto

Package Overview
Dependencies
2
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @subwallet-connect/blocto

Blocto SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern


Version published
Maintainers
1
Created

Readme

Source

@subwallet-connect/blocto

Wallet module for connecting Blocto SDK to web3-onboard

See Blocto Developer Docs

Install

npm i @subwallet-connect/blocto

Usage

import Onboard from '@subwallet-connect/core'
import bloctoModule from '@subwallet-connect/blocto'

// initialize the module with options
const blocto = bloctoModule()

const onboard = Onboard({
  // ... other Onboard options
  wallets: [
    blocto
    //... other wallets
  ]
})

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)

Build Environments

For build env configurations and setups please see the Build Env section here

Webpack 4

Node built-ins are automatically bundled in v4 so that portion is handled automatically.

Blocto support will require a Babel to compile from es6 if not already supported. See config for Babel and Webpack4 as follows

npm i --save-dev @babel/cli @babel/core @babel/node @babel/plugin-proposal-nullish-coalescing-operator @babel/plugin-proposal-optional-chaining @babel/plugin-syntax-bigint @babel/register

AND

npm i babel-loader

babel.config.js

module.exports = api => {
  api.cache(true)

  const plugins = [
    '@babel/plugin-proposal-optional-chaining',

    '@babel/plugin-proposal-nullish-coalescing-operator',

    '@babel/plugin-syntax-bigint'
  ]

  return { plugins }
}

webpack.config.js

config.module.rules = [
  ...otherModuleRules,

  {
    test: /\.js$/,

    exclude: _ => !/node_modules\/(@web3auth|@ethereumjs)/.test(_),

    loader: 'babel-loader'
  }
]

Keywords

FAQs

Last updated on 17 May 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc