Skip to content

Bitkeep JS Public APIs

bitkeep.js is a Wallet Bridge API provided by Bitget Wallet. After installing the BGW wallet, you can use this API to interact with the wallet.

SDK Source Code

Open URL

javascript
//In APP
BitKeepInvoke.openUrl("https://www.google.com");
//Out Of APP
BitKeepInvoke.openUrl2("https://www.google.com");
//In APP
BitKeepInvoke.openUrl("https://www.google.com");
//Out Of APP
BitKeepInvoke.openUrl2("https://www.google.com");

Close Page

javascript
BitKeepInvoke.close();
BitKeepInvoke.close();

Show/Hide Loading

javascript
BitKeepInvoke.showLoading();
BitKeepInvoke.hideLoading();
BitKeepInvoke.showLoading();
BitKeepInvoke.hideLoading();

Show Text Button in Top Right Corner

javascript
BitKeepInvoke.setTextAction("Text", function () {
  //Click Callback
});
BitKeepInvoke.setTextAction("Text", function () {
  //Click Callback
});

Show Icon Button in Top Right Corner

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

Toast

javascript
BitKeepInvoke.toast("Hello World");
BitKeepInvoke.toast("Hello World");

Alert

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

Confirm

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

Share Message

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

Share Image

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

Share Screenshot

javascript
BitKeepInvoke.shareScreenshot(callback);
BitKeepInvoke.shareScreenshot(callback);

Share URL

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