mathwallet5-js-sdk

1.0.6 • Public • Published

mathwalelt5-js-sdk

Javascript SDK for MathWallet5

Installation

npm

Install

npm install mathwallet5-js-sdk

Require module

var mathwallet = require('mathwallet5-js-sdk);

html

Drop the dist/mathwallet.min.js bundle into your html project

<script src="path/to/mathwallet.min.js"></script>

Get instance

var mathwallet = window.mathwallet;

Usage

Note

注意: 此SDK需要在麦子钱包的DAPP浏览器中使用
Note: The SDK needs to be used in the MathWallet DAPP Browser.

Common

适用于麦子钱包DAPP浏览器的通用方法
Common method for MathWallet DAPP Browser

isMath

mathwallet.isMathWallet();

Return

true

getAppInfo

获取用户麦子钱包信息

Get user MathWallet info

mathwallet.getAppInfo().then(console.log);

Return

{
  "name": "MathWallet5",
  "client": "iOS",
  "version": "1.0.0",
  "deviceId": "2FB1AD00-20C7-45FF-AE94-A2F30A02F8F6"
  "language": "en",
}

getCurrentWallet

获取用户当前钱包信息

Get user current wallet info

mathwallet.getCurrentWallet().then(console.log);

Return

{
  "chainType":"EVM",   
  "chainId":"1",
  "name":"ETH-01",
  "address":"0x000000000000000000000000000000"
}

walletPicker

从当前链所有钱包中,选出要授权的钱包

Get user wallet info

mathwallet.walletPicker().then(console.log);

Return

{
  "chainType":"EVM",   
  "chainId":"1",
  "name":"ETH-01",
  "address":"0x000000000000000000000000000000"
}

Download Math Wallet 麦子钱包下载

https://mathwallet.org

如果您希望将您开发的DAPP加入麦子钱包,请通过邮箱联系我们 labs@mathwallet.org

If you would like to list your DAPP in Math Wallet, please send your DAPP information to labs@mathwallet.org

Readme

Keywords

Package Sidebar

Install

npm i mathwallet5-js-sdk

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

17.9 kB

Total Files

11

Last publish

Collaborators

  • yuzhiyou