TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

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?


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.


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


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

Testing on local


# 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


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


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

Package Sidebar


Weekly Downloads






Unpacked Size

395 kB

Total Files


Last publish


  • sanyu1225
  • mordochi
  • scottphc
  • boczeratul
  • chiakic