Package Exports
- metasdk-react
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (metasdk-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
metasdk-react
SDK to communicate between React and App using QRCode
Install
npm install --save metasdk-react
Components
- Login
- Request
- SendTransaction
Usage
NOTE: Enabling CORS is necessary
import React, { Component } from 'react';
import { Login, Request, SendTransaction } from 'metasdk-react';
class Example extends Component {
callbackExample(arg) {}
render () {
return (
<div>
<Login
service='example'
callback={this.callbackExample}
/>
<hr />
<Request
request={['name', 'email']}
service='example'
callback={this.callbackExample}
/>
<hr />
<SendTransaction
to='0xff'
value='0x01'
data='0x02'
service='example'
callback={this.callbackExample}
/>
</div>
)
}
}
Test
cd metasdk-react
npm start
[Ctrl+C]
cd example
npm start
Thanks to
License
MIT © hexoul