# Webview Method(only Mobile)

Bitget Wallet provides some public methods for Dapp to interact with the wallet. You can open the Bitget DApp search bar, and try it.

# isBitKeep

// check the UserAgent include "BitKeep"
var isBitKeep = navigator.userAgent.indexOf('BitKeep') > 0;
// check the var
var isBitKeep = window.isBitKeep;
1
2
3
4

# Get Wallet Identity

BitKeepInvoke.getIdentity(callback);
1

# Get Address

BitKeepInvoke.getAddress(callback);
1

# Select Coin

BitKeepInvoke.selectCoin(callback);
1

# Toast

BitKeepInvoke.toast("Hello World");
1

# Alert

BitKeepInvoke.alert("Hello", callback);
1

# Confirm

BitKeepInvoke.confirm("Hello?", callback);
1

# Close Page

BitKeepInvoke.close();
1

# Show/Hide Loading

BitKeepInvoke.showLoading();
BitKeepInvoke.hideLoading();
1
2

# Open URL

//In APP
BitKeepInvoke.openUrl("https://www.google.com");
//Our Of APP
BitKeepInvoke.openUrl2("https://www.google.com");
1
2
3
4

# Show Text Button in right-top Corner

BitKeepInvoke.setTextAction("Text", function(){
    //Click Callback
});
1
2
3

# Show Image Button in right-top Corner

BitKeepInvoke.setIconAction("http://xxx.png", function(){
    //Click Callback
});
1
2
3

# Share Text

BitKeepInvoke.shareText("message", callback);
1

# Share Image

BitKeepInvoke.shareImage("http://xxx.png", callback);
1

# Share Screenshot

BitKeepInvoke.shareScreenshot(callback)
1

# Share URL

BitKeepInvoke.shareUrl("title", "description", "url", "icon", callback);
1

# Close Page

BitKeepInvoke.close();
1

# Close Page

BitKeepInvoke.close();
1

# Transfer

BitKeepInvoke.pay(ChainCoin, Params,Callback);
//Chain Coin Transfer
BitKeepInvoke.pay("eth", {
    "coin": "eth",
    "to": "0x.....",
    "amount": "0.1",
    "gas": "400000"
}, function(err, reply){
});
//Token Transfer
BitKeepInvoke.pay("eth", {
    "coin": "uni",
    "contract": "token contract",
    "to": "0x.....",
    "amount": "0.1",
    "gas": "400000"
}, function(err, reply){
});
//Call Contract
BitKeepInvoke.pay("eth", {
    "coin": "uni",
    "to": "token contract",
    "data": "abi data",
    "amount": "0.1",
    "gas": "400000"
}, function(err, reply){
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Last Updated: 9/4/2023, 7:13:58 PM