JS Extensions
Last updated
Last updated
JSBridge is injected javascript code in MYKEY dapp browser enviroment by default, which support Scatter protocol, and web3js protocol.
In order to control the MYKEY application conveniently, MYKEY adds the following methods:
Close App window and return to MYKEY.
Open full screen
Close full screen.
Disable physical back button, only for Android
Allow physical back button, only for Android
Get MYKEY Account Information
Get client configuration
Send transaction
Buy ram on EOS.
New field extra will be effected from Android:2.5.0,IOS:2.5.0
Apply MYKEY sign transactions
Effective from: Android:2.5.0,iOS:2.5.0
Set application title
Show loading animation
hidden loading animation
serialize specified function call
result:{"errorCode":0,"errorMsg":"","data":"[serialized data]"}
Method
Description
Check whether the current wallet is MYKEY
Close App window and return to MYKEY
Open full screen
Close full screen
Disable physical back button(Android Only)
Allow physical back button(Android Only)
Get MYKEY Account Information
Get client configuration
Send transaction
Apply MYKEY sign transactions
Set application title
Show loading animation
Hidden loading animation
serialize specified function call
Param
Type
Description
isLandscape
boolean
true(Landscape)
fasle
Param
Type
Description
openChain
string
true|fasle
true: open creating page if no chains for an account
Param
Type
Description
transaction
string
Specify chain and actions
Param
Type
Description
message
string
unsigned message
Param
Type
Description
chain
string
EOS|ETH
transactionId
string
blockNum
int
blockNum, optional
Param
Type
Description
title
string
application title
Param
Type
Description
abi
string
abi for the function, type string, eg:"[{\"constant\":false,\"inputs\":[
{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,
\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
method
string
method name, type string, eg:transfer。
param
string
params, eg:{_to:"0xc4ED1B3f31acadbE3c14B20fA766B6C4B1FAB208",
_value:"20000000000000000000"}