MYKEY Docs
中文English
English
English
  • Introduction
  • Sign in with MYKEY
    • Verify signature at backend server
    • More detailed tech and process of MYKEY login
  • Integrate with MYKEY
    • Multiple ways to integration with MYKEY
    • Mobile Dapp with H5 pages
      • ETH
      • EOS
      • JS Extensions
    • Integration via MYKEY Android SDK
      • Preconditions
      • Initiate SDK
      • Authorize
      • Sign
      • Transfer
      • Call contracts
    • Integration via MYKEY iOS SDK
      • Preconditions
      • Initiate SDK
      • Authorize
      • Sign
      • Transfer
      • Call contracts
    • Web application with scanning qrcode
    • SimpleWallet Protocol Compatible
    • Deeplink Protocol
  • Dive into MYKEY
    • Dive into MYKEY account
    • Classes and methods
      • Android Classes
      • iOS Classes
    • Error Code
    • Identify MYKEY deposit transaction
      • ETH deposit
      • EOS deposit
    • MYKEY Whitepaper
  • KEY ID
    • KEYID ETH Contracts introduction
      • Account Module
      • Account Storage Module
      • Logic Management Module
      • Logic Module
    • Account recovery mechanism
    • KEYID contract upgrade process
    • KEYID contract upgrade records
      • ETH
        • KEY ID Ethereum Contracts Upgrade Pending Time Adjustment
        • KEY ID Ethereum logic contract module upgrade announcement
        • KEY ID Ethereum Contracts Upgrade Pending Time Adjustment
        • KEY ID Ethereum AccountLogic/DualsigsLogic Contracts Upgrade
        • KEY ID Ethereum DappLogic Contract Upgrade
  • Development Resources
    • Ethereum
    • EOS
  • Join Us
    • DApp submit
    • Developers Community
Powered by GitBook
On this page
  • Sample code for redirect to MYKEY
  • Login and Transfer
  • Call Contract
  • Sign

Was this helpful?

  1. Integrate with MYKEY

SimpleWallet Protocol Compatible

PreviousWeb application with scanning qrcodeNextDeeplink Protocol

Last updated 4 years ago

Was this helpful?

Sample code for redirect to MYKEY

Reminder: In Android client, for avoid conflict with other wallets, developer can use following code to rediect to MYKEY precisely through set the MYKEY packge name: com.mykye.id

try {
    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
    intent.setPackage("com.mykey.id");
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);
} catch (Exception e) {
    e.printStackTrace();
}

Login and Transfer

MYKEY follows the SimpleWallet protocol implementation. See the following document for details:

Beside support login and transfer of SimpleWallet specification,MYKEY also additionally supports contract and signature method.

Special Notice: MYKEY account structure is different with other EOS account, if dapp verify signature in their server side, should use the public key of Reserved, more details see this Document

Call Contract

Sequence diagram for Mobile applcaiton wake up

Please pass the data to MYKEY as follows, the data format is json:

// Contract call data format

{
    protocol    string   // protocol name,use "SimpleWallet" by default
    version     string   // protocol version, e.g. "1.0"
    action      string   // action type, use "transaction"
    dappName    string   // DApp name
    dappIcon    string   // DApp icon url
    desc        string   // Semantic description of MYKEY display to the user contract call
    callback    string   // Deeplink MYKEY callback to DApp, e.g. custom://custom.com/contract
    notifyUrl   string   // The callback URL endpoint of DAppServer for receive success notification from MYKEY
    actions [  // Arrary of contact actions, include transfer and non-transfer actions
      { // non-transfer
          account   string // contract code name
          name      string // contract action name
          info      string // Semantic description of MYKEY display to the user about this action
          data      object // The parameter object passed according to the contract abi definition e.g. {key1: value1, key2: value2 }
      },
      { // transfer
          account   string //  contract code name
          name      string // contract action name
          info      string // Semantic description of MYKEY display to the user about this action
          TransferDataRequest {
            from     string // From
            to       string // To
            quantity string // Amount and Symbol,e.g. "1.0000 EOS"
            memo     string // Memo
          }
      }
    ]
    expired        number   // Only in web QR code mode, expire date,unix timestamp
}

Sign

Sequence diagram for Mobile applcaiton wake up

Please pass the data to MYKEY as follows, the data format is json:

// Sign call data format
{
    protocol    string   // protocol name,use "SimpleWallet" by default
    version     string   // protocol version, e.g. "1.0"
    action      string   // action type, use "sign"
    dappName    string   // DApp name
    dappIcon    string   // DApp icon url
    desc        string   // Semantic description of MYKEY display to the user contract call
    message     string   // Unsigned messages
    callback    string   // Deeplink MYKEY callback to DApp, e.g. custom://custom.com/contract
    notifyUrl   string   // The callback URL endpoint of DAppServer for receive success notification from MYKEY
    expired     number   // Only in web QR code mode, expire date,unix timestamp
}

https://github.com/southex/SimpleWallet/blob/master/README_en.md