README.md 1.62 KB
Newer Older
Marek Kotewicz's avatar
Marek Kotewicz committed
1
2
# native-signer

3
4
5
### Requirements

- `node.js` (tested on `v7.4.0`)
Marek Kotewicz's avatar
Marek Kotewicz committed
6
- `npm` (tested on `5.0.0`) **does not work with npm 5.1+, see [#75](https://github.com/paritytech/parity-signer/issues/75)**
7
- `rustup` (tested on `rustup 1.0.0 (17b6d21 2016-12-15)`)
Marek Kotewicz's avatar
Marek Kotewicz committed
8
9
- `rustc` (tested on `rustc 1.19.0 (0ade33941 2017-07-17)`)
- `cargo` (tested on `cargo 0.20.0 (a60d185c8 2017-07-13)`)
10
11
12
- `android_ndk` (tested on `r13b`)
- `Xcode` (only, for iOS, tested on `Version 8.1 (8B62)`)
- `$NDK_HOME` envarionment variable set to ndk home directory (eg. `/usr/local/opt/android-ndk`)
Marek Kotewicz's avatar
Marek Kotewicz committed
13
- `$JAVA_HOME` envarionment variable set to java home directory (eg. `/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home`)
14
15
16
17
18
19
20

### setup

- macOS

    ```
    ./setup_macos.sh
21
22
23

    echo "ndk.dir=$NDK_HOME" > android/local.properties
    echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
24
25
26
27
28
29
    ```

- linux

    ```
    ./setup_linux.sh
30
31
32

    echo "ndk.dir=$NDK_HOME" > android/local.properties
    echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
33
    ```
Marek Kotewicz's avatar
Marek Kotewicz committed
34
35
36

### usage

37
38
39
- iOS

    ```
40
    npm run ios
41
42
43
44
45
    ```

- Android

    ```
46
    npm run android
47
48
    ```

Marek Kotewicz's avatar
Marek Kotewicz committed
49
50
### Example

Marek Kotewicz's avatar
Marek Kotewicz committed
51
#### Create new account
52

Marek Kotewicz's avatar
Marek Kotewicz committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
seed: `this is sparta`

address: `006E27B6A72E1f34C626762F3C4761547Aff1421`

#### Scan qr code


qr:

[![qr][tx_qr]]

data:

```json
{
68
69
70
71
72
73
  "action":"signTransaction",
  "data":
  {
    "rlp":"f85f800182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804",
    "account":"006E27B6A72E1f34C626762F3C4761547Aff1421"
  }
Marek Kotewicz's avatar
Marek Kotewicz committed
74
75
76
77
}
```

[tx_qr]: ./docs/tx_qr.png