Socket
Socket
Sign inDemoInstall

@blocto/sdk

Package Overview
Dependencies
61
Maintainers
6
Versions
156
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @blocto/sdk

[![npm (lastest)](https://img.shields.io/npm/v/@blocto/sdk/latest)](https://www.npmjs.com/package/@blocto/sdk) [![npm (beta)](https://img.shields.io/npm/v/@blocto/sdk/beta)](https://www.npmjs.com/package/@blocto/sdk) [![npm bundle size](https://img.shield


Version published
Weekly downloads
39K
increased by22.5%
Maintainers
6
Created
Weekly downloads
 

Readme

Source

Blocto JavaScript SDK

npm (lastest) npm (beta) npm bundle size Github Checks npm downloads LICENSE Discord

Use Blocto SDK in your dApp to provide excellent user experience!

Looking for the documentation?

https://docs.blocto.app/blocto-sdk/javascript-sdk

What can I do with Blocto SDK?

  • Interact with multiple blockchains
    • Interact with Ethereum-compatible blockchains
      Ethereum Mainnet & Goerli Testnet
      Arbitrum Mainnet & Arbitrum Goerli Testnet
      Optimism Mainnet & Optimism Goerli Testnet
      Polygon Mainnet & Testnet
      BNB Smart Chain Mainnet & Tetsnet
      Avalanche Mainnet & Testnet
    • Interact with Aptos
    • Sign messages
    • Send transactions
    • ... and a lot more
  • Seamless onboarding experience
    Users can sign up easily with email and start exploring you dApp in seconds.
  • Fee subsidization
    You have the option to pay transaction fee for your users and provide a better experience. In that case, we will generate daily fee reports for you to review.
  • Integrated payment
    Get paid easily with our payment APIs. Users can pay easily with credit cards or other crypto currencies like Bitcoin, Ethereum, Tron, USDT, ...
  • Connected to Blocto App
    Once you've integrated with Blocto SDK, your users can manage their assets easily and securely through Blocto App. Your dApp can tap into the vast blockchain ecosystem instantly.

Installing

$ yarn add @blocto/sdk
# or
$ npm i @blocto/sdk

Usage

import BloctoSDK from '@blocto/sdk';

const bloctoSDK = new BloctoSDK({
  // advance settings please refer to docs
  ethereum: {
    // (required) chainId to be used
    chainId: '0x5',
    // (required for Ethereum) JSON RPC endpoint
    rpc: 'https://mainnet.infura.io/v3/YOUR_INFURA_ID',
  },

  // (optional) Blocto app ID
  appId: 'YOUR_BLOCTO_APP_ID',
});

Testing on local

yarn

# generate local https cert
brew install mkcert
mkcert -install
cd dev-cert
mkcert localhost

# make dev directory
mkdir dev
ln -s src/main.js dev/main.js

Scripts

build: build dist
start: run live-reload dev server on https://localhost:7777

Develop

open browser and navigate to https://localhost:7777/test.html

Keywords

FAQs

Last updated on 16 Apr 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