@onekeyfe/hd-transport 1.2.0-alpha.43 → 1.2.0-alpha.44
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.
|
@@ -3,6 +3,7 @@ const {
|
|
|
3
3
|
createMessageFromType,
|
|
4
4
|
parseConfigure,
|
|
5
5
|
} = require('../src/serialization/protobuf/messages');
|
|
6
|
+
const { encode } = require('../src/serialization/protobuf/encode');
|
|
6
7
|
const v1Messages = require('../../core/src/data/messages/messages.json');
|
|
7
8
|
const v2Messages = require('../messages-protocol-v2.json');
|
|
8
9
|
const coreV2Messages = require('../../core/src/data/messages/messages-protocol-v2.json');
|
|
@@ -186,11 +187,13 @@ describe('messages', () => {
|
|
|
186
187
|
const messages = parseConfigure(v2Messages);
|
|
187
188
|
const { Message } = createMessageFromName(messages, 'DeviceSessionAskPassphrase');
|
|
188
189
|
|
|
190
|
+
const standardWallet = encode(Message, { passphrase: '', on_device: false });
|
|
189
191
|
const onHost = Message.encode(
|
|
190
192
|
Message.create({ passphrase: 'host hidden wallet', on_device: false })
|
|
191
193
|
).finish();
|
|
192
194
|
const onDevice = Message.encode(Message.create({ on_device: true })).finish();
|
|
193
195
|
|
|
196
|
+
expect(standardWallet.toString('hex')).toBe('0a001000');
|
|
194
197
|
expect(Buffer.from(onHost).toString('hex')).toBe(
|
|
195
198
|
'0a12686f73742068696464656e2077616c6c65741000'
|
|
196
199
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.44",
|
|
4
4
|
"description": "Transport layer abstractions and utilities for OneKey hardware SDK.",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"long": "^4.0.0",
|
|
29
29
|
"protobufjs": "^6.11.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6de180b61cd4a64f41cf4ffd32eeb8a1cc4e64e7"
|
|
32
32
|
}
|