Provider
A thin JSON-RPC wrapper for interacting with chains and Blocto wallet.
Blocto SDK comes with an Petra (Aptos official wallet) API-compatible provider, you can use it to interact with Aptos network.
Note that Blocto SDK for Aptos is still in Beta. APIs are subject to breaking changes.
Installation
Install from npm/yarn
... or via CDN
Get App ID
It's required to register an app id before using Blocto SDK, check out the Register App ID section
Usage
Initiate the Blocto provider
Blocto Provider parameters
aptos.chainId
number
Aptos chain ID to connect to
Yes
appId
String
Blocto dApp ID
Yes
Examples
Connect to Blocto wallet
Once the connection request is fired, there would be a prompt modal to guide user to register/login to Blocto wallet
After connecting with Blocto wallet, you can start to interact with Aptos blockchain with Blocto provider.
Last updated