Blocto
About portto
Blog
Search…
📣
Introduction
Give Feedback
Blocto
Overview
Web3.js Integration (Ethereum / BSC / Polygon / Avalanche / Tron)
Web3.js Integration (Solana)
Deep Linking
Push Notification
Rewards
Token Listing
BLOCTO SDK
Overview
Register App ID
Javascript SDK
Flow
Ethereum / BSC / Polygon / Avalanche
Solana
Getting started
Connect to Blocto wallet
Send Transaction
Server Sider Render
Tezos (Coming Soon)
Android SDK
iOS SDK
Technical Documents
Contract Wallet
Key Management
Community
Discord
Twitter
Facebook
Powered By
GitBook
Getting started
A thin JSON-RPC wrapper for interacting with chains and Blocto wallet.
Blocto SDK comes with an
EIP-1193
compatible provider, you can use it to interact with Solana.
Note that Blocto SDK for Solana is still in
Beta
. APIs are subject to breaking changes.
Installation
Install from npm/yarn
1
$
yarn
add
@solana/web3.js
2
$
yarn
add
@blocto/sdk
Copied!
... or via CDN
1
<
script src
=
"https://unpkg.com/@solana/
[email protected]
/lib/index.iife.min.js"
></
script
>
2
<
script src
=
"https://unpkg.com/@blocto/
[email protected]
/dist/blocto-sdk.umd.js"
crossorigin
=
"anonymous"
referrerpolicy
=
"no-referrer"
></
script
>
Copied!
Usage
Initiate the Blocto provider
1
import
solanaWeb3
from
'@solana/web3'
2
import
BloctoSDK
from
'@blocto/sdk'
3
​
4
const
bloctoSDK
=
new
BloctoSDK
({
5
solana
:
{
6
// (required) devnet to be used
7
net
:
'testnet'
,
8
},
9
10
// (optional) Blocto app ID
11
appId
:
'YOUR_BLOCTO_APP_ID'
,
12
});
Copied!
Blocto Provider parameters
Parameter
Type
Description
Required
solana.net
String
one of
testnet
or
mainnet-beta
Yes
appId
String
Blocto dApp ID
No
​
Previous
Solana
Next
Connect to Blocto wallet
Last modified
10mo ago
Copy link
Contents
Installation
Usage