expo-walletsdk
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

expo-walletsdk

ethOS WalletSDK for Expo apps.

Add the package to your npm dependencies

npm install expo-walletsdk

How to use it

You want to first check if the device is ethOS before running signMessage or sendTransaction.

Start by importing all the ethOS WalletSDK functions like this:

import * as ExpoWalletsdk from 'expo-walletsdk';

Then you can call ExpoWalletsdk.isEthOS(), which will return true if the device is running ethOS.

How to sign a message:

var signMessageParams: ExpoWalletsdk.SignMessageParams = {
    message: "Hello World"
}
var result = ExpoWalletsdk.signMessage(signMessageParams)

How to send Transactions:

var txParams: ExpoWalletsdk.TransactionParams = {
    to: "",
    value: "1000000000000000000", // 1 eth in wei
    data: ""
}
var txId = ExpoWalletsdk.sendTransaction(params)

Support

If you have any comments/questions please feel free to ask them in our discord: https://discord.gg/unqv49a66f

Package Sidebar

Install

npm i expo-walletsdk

Weekly Downloads

2

Version

0.2.4

License

MIT

Unpacked Size

39.4 kB

Total Files

51

Last publish

Collaborators

  • mhaas_eth