@onekeyfe/hd-web-sdk 0.1.50 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -5
- package/build/iframe.html +1 -1
- package/build/js/iframe.fe55716ec5664e14b47b.js +3 -0
- package/build/js/{iframe.b8e40a18b27ba2c33153.js.LICENSE.txt → iframe.fe55716ec5664e14b47b.js.LICENSE.txt} +0 -0
- package/build/js/iframe.fe55716ec5664e14b47b.js.map +1 -0
- package/build/onekey-js-sdk.js +32 -14
- package/build/onekey-js-sdk.js.map +1 -1
- package/build/onekey-js-sdk.min.js +1 -1
- package/build/onekey-js-sdk.min.js.map +1 -1
- package/package.json +6 -6
- package/build/js/iframe.b8e40a18b27ba2c33153.js +0 -3
- package/build/js/iframe.b8e40a18b27ba2c33153.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@onekeyfe/hd-web-sdk`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@onekeyfe/hd-web-sdk` is a browser implementation of hardware-sdk that creates an iframe and communicates with transport through the iframe to avoid cross-domain issues.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
+
Install library as npm module:
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
npm install @onekeyfe/hd-web-sdk
|
|
7
11
|
```
|
|
8
|
-
const hdWebSdk = require('hd-web-sdk');
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
or
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
yarn add @onekeyfe/hd-web-sdk
|
|
11
17
|
```
|
|
18
|
+
|
|
19
|
+
## Initialization
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
import HardwareSDK from '@onekeyfe/hd-web-sdk';
|
|
23
|
+
|
|
24
|
+
function init() {
|
|
25
|
+
HardwareSDK.init({
|
|
26
|
+
debug: false,
|
|
27
|
+
connectSrc: 'https://jssdk.onekey.so/'
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Docs
|
|
33
|
+
|
|
34
|
+
Documentation is available [hardware-js-sdk](https://developer.onekey.so/connect-to-hardware/hardware-sdk/start)
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
// TODO: add example url
|
package/build/iframe.html
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
const iframeScript = document.createElement('script');
|
|
26
26
|
iframeScript.setAttribute('type', 'text/javascript');
|
|
27
|
-
iframeScript.setAttribute('src', './js/iframe.
|
|
27
|
+
iframeScript.setAttribute('src', './js/iframe.fe55716ec5664e14b47b.js');
|
|
28
28
|
iframeScript.setAttribute('async', 'false');
|
|
29
29
|
document.body.appendChild(iframeScript);
|
|
30
30
|
</script>
|