@onekeyfe/hd-transport 0.0.1
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/.eslintrc +21 -0
- package/README.md +3 -0
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/index.d.ts +2725 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +742 -0
- package/dist/serialization/index.d.ts +5 -0
- package/dist/serialization/index.d.ts.map +1 -0
- package/dist/serialization/protobuf/decode.d.ts +6 -0
- package/dist/serialization/protobuf/decode.d.ts.map +1 -0
- package/dist/serialization/protobuf/encode.d.ts +5 -0
- package/dist/serialization/protobuf/encode.d.ts.map +1 -0
- package/dist/serialization/protobuf/index.d.ts +4 -0
- package/dist/serialization/protobuf/index.d.ts.map +1 -0
- package/dist/serialization/protobuf/messages.d.ts +11 -0
- package/dist/serialization/protobuf/messages.d.ts.map +1 -0
- package/dist/serialization/protocol/decode.d.ts +11 -0
- package/dist/serialization/protocol/decode.d.ts.map +1 -0
- package/dist/serialization/protocol/encode.d.ts +11 -0
- package/dist/serialization/protocol/encode.d.ts.map +1 -0
- package/dist/serialization/protocol/index.d.ts +3 -0
- package/dist/serialization/protocol/index.d.ts.map +1 -0
- package/dist/serialization/receive.d.ts +8 -0
- package/dist/serialization/receive.d.ts.map +1 -0
- package/dist/serialization/send.d.ts +6 -0
- package/dist/serialization/send.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/messages.d.ts +1954 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/transport.d.ts +42 -0
- package/dist/types/transport.d.ts.map +1 -0
- package/dist/utils/highlevel-checks.d.ts +10 -0
- package/dist/utils/highlevel-checks.d.ts.map +1 -0
- package/dist/utils/protobuf.d.ts +2 -0
- package/dist/utils/protobuf.d.ts.map +1 -0
- package/package.json +27 -0
- package/src/constants.ts +4 -0
- package/src/index.ts +28 -0
- package/src/serialization/index.ts +6 -0
- package/src/serialization/protobuf/decode.ts +83 -0
- package/src/serialization/protobuf/encode.ts +79 -0
- package/src/serialization/protobuf/index.ts +3 -0
- package/src/serialization/protobuf/messages.ts +37 -0
- package/src/serialization/protocol/decode.ts +48 -0
- package/src/serialization/protocol/encode.ts +59 -0
- package/src/serialization/protocol/index.ts +2 -0
- package/src/serialization/receive.ts +18 -0
- package/src/serialization/send.ts +39 -0
- package/src/types/index.ts +2 -0
- package/src/types/messages.ts +2489 -0
- package/src/types/transport.ts +51 -0
- package/src/utils/highlevel-checks.ts +88 -0
- package/src/utils/protobuf.ts +24 -0
- package/tsconfig.json +7 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,742 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var protobuf = require('protobufjs/light');
|
|
6
|
+
var Long = require('long');
|
|
7
|
+
var ByteBuffer = require('bytebuffer');
|
|
8
|
+
var buffer = require('buffer');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
function _interopNamespace(e) {
|
|
13
|
+
if (e && e.__esModule) return e;
|
|
14
|
+
var n = Object.create(null);
|
|
15
|
+
if (e) {
|
|
16
|
+
Object.keys(e).forEach(function (k) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return e[k]; }
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
n["default"] = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var protobuf__namespace = /*#__PURE__*/_interopNamespace(protobuf);
|
|
31
|
+
var Long__namespace = /*#__PURE__*/_interopNamespace(Long);
|
|
32
|
+
var ByteBuffer__default = /*#__PURE__*/_interopDefaultLegacy(ByteBuffer);
|
|
33
|
+
|
|
34
|
+
/******************************************************************************
|
|
35
|
+
Copyright (c) Microsoft Corporation.
|
|
36
|
+
|
|
37
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
38
|
+
purpose with or without fee is hereby granted.
|
|
39
|
+
|
|
40
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
41
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
42
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
43
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
44
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
45
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
46
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
47
|
+
***************************************************************************** */
|
|
48
|
+
|
|
49
|
+
function __rest(s, e) {
|
|
50
|
+
var t = {};
|
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
+
t[p] = s[p];
|
|
53
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
+
t[p[i]] = s[p[i]];
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const primitiveTypes = [
|
|
62
|
+
'bool',
|
|
63
|
+
'string',
|
|
64
|
+
'bytes',
|
|
65
|
+
'int32',
|
|
66
|
+
'int64',
|
|
67
|
+
'uint32',
|
|
68
|
+
'uint64',
|
|
69
|
+
'sint32',
|
|
70
|
+
'sint64',
|
|
71
|
+
'fixed32',
|
|
72
|
+
'fixed64',
|
|
73
|
+
'sfixed32',
|
|
74
|
+
'sfixed64',
|
|
75
|
+
'double',
|
|
76
|
+
'float',
|
|
77
|
+
];
|
|
78
|
+
const isPrimitiveField = (field) => primitiveTypes.includes(field);
|
|
79
|
+
|
|
80
|
+
const transform$1 = (field, value) => {
|
|
81
|
+
if (field.optional && typeof value === 'undefined') {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
if (field.type === 'bytes') {
|
|
85
|
+
return ByteBuffer__default["default"].wrap(value).toString('hex');
|
|
86
|
+
}
|
|
87
|
+
if (field.long) {
|
|
88
|
+
if (Number.isSafeInteger(value.toNumber())) {
|
|
89
|
+
return value.toNumber();
|
|
90
|
+
}
|
|
91
|
+
return value.toString();
|
|
92
|
+
}
|
|
93
|
+
return value;
|
|
94
|
+
};
|
|
95
|
+
function messageToJSON(Message, fields) {
|
|
96
|
+
const message = __rest(Message, []);
|
|
97
|
+
const res = {};
|
|
98
|
+
Object.keys(fields).forEach(key => {
|
|
99
|
+
const field = fields[key];
|
|
100
|
+
const value = message[key];
|
|
101
|
+
if (field.repeated) {
|
|
102
|
+
if (isPrimitiveField(field.type)) {
|
|
103
|
+
res[key] = value.map((v) => transform$1(field, v));
|
|
104
|
+
}
|
|
105
|
+
else if ('valuesById' in field.resolvedType) {
|
|
106
|
+
res[key] = value;
|
|
107
|
+
}
|
|
108
|
+
else if ('fields' in field.resolvedType) {
|
|
109
|
+
res[key] = value.map((v) => messageToJSON(v, field.resolvedType.fields));
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
throw new Error(`case not handled for repeated key: ${key}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else if (isPrimitiveField(field.type)) {
|
|
116
|
+
res[key] = transform$1(field, value);
|
|
117
|
+
}
|
|
118
|
+
else if ('valuesById' in field.resolvedType) {
|
|
119
|
+
res[key] = field.resolvedType.valuesById[value];
|
|
120
|
+
}
|
|
121
|
+
else if (field.resolvedType.fields) {
|
|
122
|
+
res[key] = messageToJSON(value, field.resolvedType.fields);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
throw new Error(`case not handled: ${key}`);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return res;
|
|
129
|
+
}
|
|
130
|
+
const decode$1 = (Message, data) => {
|
|
131
|
+
const buff = data.toBuffer();
|
|
132
|
+
const a = new Uint8Array(buff);
|
|
133
|
+
const decoded = Message.decode(a);
|
|
134
|
+
return messageToJSON(decoded, decoded.$type.fields);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const transform = (fieldType, value) => {
|
|
138
|
+
if (fieldType === 'bytes') {
|
|
139
|
+
if (typeof value === 'string' && !value)
|
|
140
|
+
return value;
|
|
141
|
+
return buffer.Buffer.from(value, 'hex');
|
|
142
|
+
}
|
|
143
|
+
if (typeof value === 'number' && !Number.isSafeInteger(value)) {
|
|
144
|
+
throw new RangeError('field value is not within safe integer range');
|
|
145
|
+
}
|
|
146
|
+
return value;
|
|
147
|
+
};
|
|
148
|
+
function patch(Message, payload) {
|
|
149
|
+
const patched = {};
|
|
150
|
+
if (!Message.fields) {
|
|
151
|
+
return patched;
|
|
152
|
+
}
|
|
153
|
+
Object.keys(Message.fields).forEach(key => {
|
|
154
|
+
const field = Message.fields[key];
|
|
155
|
+
const value = payload[key];
|
|
156
|
+
if (typeof value === 'undefined') {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
if (isPrimitiveField(field.type)) {
|
|
160
|
+
if (field.repeated) {
|
|
161
|
+
patched[key] = value.map((v) => transform(field.type, v));
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
patched[key] = transform(field.type, value);
|
|
165
|
+
}
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (field.repeated) {
|
|
169
|
+
const RefMessage = Message.lookupTypeOrEnum(field.type);
|
|
170
|
+
patched[key] = value.map((v) => patch(RefMessage, v));
|
|
171
|
+
}
|
|
172
|
+
else if (typeof value === 'object' && value !== null) {
|
|
173
|
+
const RefMessage = Message.lookupType(field.type);
|
|
174
|
+
patched[key] = patch(RefMessage, value);
|
|
175
|
+
}
|
|
176
|
+
else if (typeof value === 'number') {
|
|
177
|
+
const RefMessage = Message.lookupEnum(field.type);
|
|
178
|
+
patched[key] = RefMessage.values[value];
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
patched[key] = value;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
return patched;
|
|
185
|
+
}
|
|
186
|
+
const encode$1 = (Message, data) => {
|
|
187
|
+
const payload = patch(Message, data);
|
|
188
|
+
const message = Message.fromObject(payload);
|
|
189
|
+
const buffer = Message.encode(message).finish();
|
|
190
|
+
const bytebuffer = new ByteBuffer__default["default"](buffer.byteLength);
|
|
191
|
+
bytebuffer.append(buffer);
|
|
192
|
+
bytebuffer.reset();
|
|
193
|
+
return bytebuffer;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
function parseConfigure(data) {
|
|
197
|
+
if (typeof data === 'string') {
|
|
198
|
+
return protobuf__namespace.Root.fromJSON(JSON.parse(data));
|
|
199
|
+
}
|
|
200
|
+
return protobuf__namespace.Root.fromJSON(data);
|
|
201
|
+
}
|
|
202
|
+
const createMessageFromName = (messages, name) => {
|
|
203
|
+
const Message = messages.lookupType(name);
|
|
204
|
+
const MessageType = messages.lookupEnum('MessageType');
|
|
205
|
+
let messageType = MessageType.values[`MessageType_${name}`];
|
|
206
|
+
if (!messageType && Message.options) {
|
|
207
|
+
messageType = Message.options['(wire_type)'];
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
Message,
|
|
211
|
+
messageType,
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
const createMessageFromType = (messages, typeId) => {
|
|
215
|
+
const MessageType = messages.lookupEnum('MessageType');
|
|
216
|
+
const messageName = MessageType.valuesById[typeId].replace('MessageType_', '');
|
|
217
|
+
const Message = messages.lookupType(messageName);
|
|
218
|
+
return {
|
|
219
|
+
Message,
|
|
220
|
+
messageName,
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const MESSAGE_TOP_CHAR = 0x003f;
|
|
225
|
+
const MESSAGE_HEADER_BYTE = 0x23;
|
|
226
|
+
const HEADER_SIZE = 1 + 1 + 4 + 2;
|
|
227
|
+
const BUFFER_SIZE = 63;
|
|
228
|
+
|
|
229
|
+
const readHeader = (buffer) => {
|
|
230
|
+
const typeId = buffer.readUint16();
|
|
231
|
+
const length = buffer.readUint32();
|
|
232
|
+
return { typeId, length };
|
|
233
|
+
};
|
|
234
|
+
const decode = (byteBuffer) => {
|
|
235
|
+
const { typeId } = readHeader(byteBuffer);
|
|
236
|
+
return {
|
|
237
|
+
typeId,
|
|
238
|
+
buffer: byteBuffer,
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
function encode(data, options) {
|
|
243
|
+
const { addTrezorHeaders, chunked, messageType } = options;
|
|
244
|
+
const fullSize = (addTrezorHeaders ? HEADER_SIZE : HEADER_SIZE - 2) + data.limit;
|
|
245
|
+
const encodedByteBuffer = new ByteBuffer__default["default"](fullSize);
|
|
246
|
+
if (addTrezorHeaders) {
|
|
247
|
+
encodedByteBuffer.writeByte(MESSAGE_HEADER_BYTE);
|
|
248
|
+
encodedByteBuffer.writeByte(MESSAGE_HEADER_BYTE);
|
|
249
|
+
}
|
|
250
|
+
encodedByteBuffer.writeUint16(messageType);
|
|
251
|
+
encodedByteBuffer.writeUint32(data.limit);
|
|
252
|
+
encodedByteBuffer.append(data.buffer);
|
|
253
|
+
encodedByteBuffer.reset();
|
|
254
|
+
if (chunked === false) {
|
|
255
|
+
return encodedByteBuffer;
|
|
256
|
+
}
|
|
257
|
+
const result = [];
|
|
258
|
+
const size = BUFFER_SIZE;
|
|
259
|
+
const count = Math.floor((encodedByteBuffer.limit - 1) / size) + 1 || 1;
|
|
260
|
+
for (let i = 0; i < count; i++) {
|
|
261
|
+
const start = i * size;
|
|
262
|
+
const end = Math.min((i + 1) * size, encodedByteBuffer.limit);
|
|
263
|
+
const slice = encodedByteBuffer.slice(start, end);
|
|
264
|
+
slice.compact();
|
|
265
|
+
result.push(slice.buffer);
|
|
266
|
+
}
|
|
267
|
+
return result;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function buildOne(messages, name, data) {
|
|
271
|
+
const { Message, messageType } = createMessageFromName(messages, name);
|
|
272
|
+
const buffer = encode$1(Message, data);
|
|
273
|
+
return encode(buffer, {
|
|
274
|
+
addTrezorHeaders: false,
|
|
275
|
+
chunked: false,
|
|
276
|
+
messageType,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
const buildBuffer = (messages, name, data) => {
|
|
280
|
+
const { Message, messageType } = createMessageFromName(messages, name);
|
|
281
|
+
const buffer = encode$1(Message, data);
|
|
282
|
+
const encodeBuffer = encode(buffer, {
|
|
283
|
+
addTrezorHeaders: true,
|
|
284
|
+
chunked: false,
|
|
285
|
+
messageType,
|
|
286
|
+
});
|
|
287
|
+
const outBuffer = new ByteBuffer__default["default"](BUFFER_SIZE + 1);
|
|
288
|
+
outBuffer.writeByte(MESSAGE_TOP_CHAR);
|
|
289
|
+
outBuffer.append(encodeBuffer);
|
|
290
|
+
outBuffer.reset();
|
|
291
|
+
return outBuffer;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
function receiveOne(messages, data) {
|
|
295
|
+
const bytebuffer = ByteBuffer__default["default"].wrap(data, 'hex');
|
|
296
|
+
const { typeId, buffer } = decode(bytebuffer);
|
|
297
|
+
const { Message, messageName } = createMessageFromType(messages, typeId);
|
|
298
|
+
const message = decode$1(Message, buffer);
|
|
299
|
+
return {
|
|
300
|
+
message,
|
|
301
|
+
type: messageName,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const ERROR = 'Wrong result type.';
|
|
306
|
+
function info(res) {
|
|
307
|
+
if (typeof res !== 'object' || res == null) {
|
|
308
|
+
throw new Error('Wrong result type.');
|
|
309
|
+
}
|
|
310
|
+
const { version } = res;
|
|
311
|
+
if (typeof version !== 'string') {
|
|
312
|
+
throw new Error(ERROR);
|
|
313
|
+
}
|
|
314
|
+
const configured = !!res.configured;
|
|
315
|
+
return { version, configured };
|
|
316
|
+
}
|
|
317
|
+
function version(version) {
|
|
318
|
+
if (typeof version !== 'string') {
|
|
319
|
+
throw new Error(ERROR);
|
|
320
|
+
}
|
|
321
|
+
return version.trim();
|
|
322
|
+
}
|
|
323
|
+
function convertSession(r) {
|
|
324
|
+
if (r == null) {
|
|
325
|
+
return null;
|
|
326
|
+
}
|
|
327
|
+
if (typeof r !== 'string') {
|
|
328
|
+
throw new Error(ERROR);
|
|
329
|
+
}
|
|
330
|
+
return r;
|
|
331
|
+
}
|
|
332
|
+
function devices(res) {
|
|
333
|
+
if (typeof res !== 'object') {
|
|
334
|
+
throw new Error(ERROR);
|
|
335
|
+
}
|
|
336
|
+
if (!(res instanceof Array)) {
|
|
337
|
+
throw new Error(ERROR);
|
|
338
|
+
}
|
|
339
|
+
return res.map((o) => {
|
|
340
|
+
if (typeof o !== 'object' || o == null) {
|
|
341
|
+
throw new Error(ERROR);
|
|
342
|
+
}
|
|
343
|
+
const { path } = o;
|
|
344
|
+
if (typeof path !== 'string') {
|
|
345
|
+
throw new Error(ERROR);
|
|
346
|
+
}
|
|
347
|
+
const pathS = path.toString();
|
|
348
|
+
return {
|
|
349
|
+
path: pathS,
|
|
350
|
+
session: convertSession(o.session),
|
|
351
|
+
debugSession: convertSession(o.debugSession),
|
|
352
|
+
product: o.product,
|
|
353
|
+
vendor: o.vendor,
|
|
354
|
+
debug: !!o.debug,
|
|
355
|
+
};
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
function acquire(res) {
|
|
359
|
+
if (typeof res !== 'object' || res == null) {
|
|
360
|
+
throw new Error(ERROR);
|
|
361
|
+
}
|
|
362
|
+
const { session } = res;
|
|
363
|
+
if (typeof session !== 'string' && typeof session !== 'number') {
|
|
364
|
+
throw new Error(ERROR);
|
|
365
|
+
}
|
|
366
|
+
return session.toString();
|
|
367
|
+
}
|
|
368
|
+
function call(res) {
|
|
369
|
+
if (typeof res !== 'object' || res == null) {
|
|
370
|
+
throw new Error(ERROR);
|
|
371
|
+
}
|
|
372
|
+
const { type } = res;
|
|
373
|
+
if (typeof type !== 'string') {
|
|
374
|
+
throw new Error(ERROR);
|
|
375
|
+
}
|
|
376
|
+
const { message } = res;
|
|
377
|
+
if (typeof message !== 'object' || message == null) {
|
|
378
|
+
throw new Error(ERROR);
|
|
379
|
+
}
|
|
380
|
+
return { type, message };
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
var check = /*#__PURE__*/Object.freeze({
|
|
384
|
+
__proto__: null,
|
|
385
|
+
info: info,
|
|
386
|
+
version: version,
|
|
387
|
+
devices: devices,
|
|
388
|
+
acquire: acquire,
|
|
389
|
+
call: call
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
var BinanceOrderType;
|
|
393
|
+
(function (BinanceOrderType) {
|
|
394
|
+
BinanceOrderType[BinanceOrderType["OT_UNKNOWN"] = 0] = "OT_UNKNOWN";
|
|
395
|
+
BinanceOrderType[BinanceOrderType["MARKET"] = 1] = "MARKET";
|
|
396
|
+
BinanceOrderType[BinanceOrderType["LIMIT"] = 2] = "LIMIT";
|
|
397
|
+
BinanceOrderType[BinanceOrderType["OT_RESERVED"] = 3] = "OT_RESERVED";
|
|
398
|
+
})(BinanceOrderType || (BinanceOrderType = {}));
|
|
399
|
+
var BinanceOrderSide;
|
|
400
|
+
(function (BinanceOrderSide) {
|
|
401
|
+
BinanceOrderSide[BinanceOrderSide["SIDE_UNKNOWN"] = 0] = "SIDE_UNKNOWN";
|
|
402
|
+
BinanceOrderSide[BinanceOrderSide["BUY"] = 1] = "BUY";
|
|
403
|
+
BinanceOrderSide[BinanceOrderSide["SELL"] = 2] = "SELL";
|
|
404
|
+
})(BinanceOrderSide || (BinanceOrderSide = {}));
|
|
405
|
+
var BinanceTimeInForce;
|
|
406
|
+
(function (BinanceTimeInForce) {
|
|
407
|
+
BinanceTimeInForce[BinanceTimeInForce["TIF_UNKNOWN"] = 0] = "TIF_UNKNOWN";
|
|
408
|
+
BinanceTimeInForce[BinanceTimeInForce["GTE"] = 1] = "GTE";
|
|
409
|
+
BinanceTimeInForce[BinanceTimeInForce["TIF_RESERVED"] = 2] = "TIF_RESERVED";
|
|
410
|
+
BinanceTimeInForce[BinanceTimeInForce["IOC"] = 3] = "IOC";
|
|
411
|
+
})(BinanceTimeInForce || (BinanceTimeInForce = {}));
|
|
412
|
+
var Enum_InputScriptType;
|
|
413
|
+
(function (Enum_InputScriptType) {
|
|
414
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDADDRESS"] = 0] = "SPENDADDRESS";
|
|
415
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDMULTISIG"] = 1] = "SPENDMULTISIG";
|
|
416
|
+
Enum_InputScriptType[Enum_InputScriptType["EXTERNAL"] = 2] = "EXTERNAL";
|
|
417
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDWITNESS"] = 3] = "SPENDWITNESS";
|
|
418
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDP2SHWITNESS"] = 4] = "SPENDP2SHWITNESS";
|
|
419
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDTAPROOT"] = 5] = "SPENDTAPROOT";
|
|
420
|
+
})(Enum_InputScriptType || (Enum_InputScriptType = {}));
|
|
421
|
+
var Enum_OutputScriptType;
|
|
422
|
+
(function (Enum_OutputScriptType) {
|
|
423
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOADDRESS"] = 0] = "PAYTOADDRESS";
|
|
424
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOSCRIPTHASH"] = 1] = "PAYTOSCRIPTHASH";
|
|
425
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOMULTISIG"] = 2] = "PAYTOMULTISIG";
|
|
426
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOOPRETURN"] = 3] = "PAYTOOPRETURN";
|
|
427
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOWITNESS"] = 4] = "PAYTOWITNESS";
|
|
428
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOP2SHWITNESS"] = 5] = "PAYTOP2SHWITNESS";
|
|
429
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOTAPROOT"] = 6] = "PAYTOTAPROOT";
|
|
430
|
+
})(Enum_OutputScriptType || (Enum_OutputScriptType = {}));
|
|
431
|
+
var DecredStakingSpendType;
|
|
432
|
+
(function (DecredStakingSpendType) {
|
|
433
|
+
DecredStakingSpendType[DecredStakingSpendType["SSGen"] = 0] = "SSGen";
|
|
434
|
+
DecredStakingSpendType[DecredStakingSpendType["SSRTX"] = 1] = "SSRTX";
|
|
435
|
+
})(DecredStakingSpendType || (DecredStakingSpendType = {}));
|
|
436
|
+
var AmountUnit;
|
|
437
|
+
(function (AmountUnit) {
|
|
438
|
+
AmountUnit[AmountUnit["BITCOIN"] = 0] = "BITCOIN";
|
|
439
|
+
AmountUnit[AmountUnit["MILLIBITCOIN"] = 1] = "MILLIBITCOIN";
|
|
440
|
+
AmountUnit[AmountUnit["MICROBITCOIN"] = 2] = "MICROBITCOIN";
|
|
441
|
+
AmountUnit[AmountUnit["SATOSHI"] = 3] = "SATOSHI";
|
|
442
|
+
})(AmountUnit || (AmountUnit = {}));
|
|
443
|
+
var Enum_RequestType;
|
|
444
|
+
(function (Enum_RequestType) {
|
|
445
|
+
Enum_RequestType[Enum_RequestType["TXINPUT"] = 0] = "TXINPUT";
|
|
446
|
+
Enum_RequestType[Enum_RequestType["TXOUTPUT"] = 1] = "TXOUTPUT";
|
|
447
|
+
Enum_RequestType[Enum_RequestType["TXMETA"] = 2] = "TXMETA";
|
|
448
|
+
Enum_RequestType[Enum_RequestType["TXFINISHED"] = 3] = "TXFINISHED";
|
|
449
|
+
Enum_RequestType[Enum_RequestType["TXEXTRADATA"] = 4] = "TXEXTRADATA";
|
|
450
|
+
Enum_RequestType[Enum_RequestType["TXORIGINPUT"] = 5] = "TXORIGINPUT";
|
|
451
|
+
Enum_RequestType[Enum_RequestType["TXORIGOUTPUT"] = 6] = "TXORIGOUTPUT";
|
|
452
|
+
Enum_RequestType[Enum_RequestType["TXPAYMENTREQ"] = 7] = "TXPAYMENTREQ";
|
|
453
|
+
})(Enum_RequestType || (Enum_RequestType = {}));
|
|
454
|
+
var CardanoDerivationType;
|
|
455
|
+
(function (CardanoDerivationType) {
|
|
456
|
+
CardanoDerivationType[CardanoDerivationType["LEDGER"] = 0] = "LEDGER";
|
|
457
|
+
CardanoDerivationType[CardanoDerivationType["ICARUS"] = 1] = "ICARUS";
|
|
458
|
+
CardanoDerivationType[CardanoDerivationType["ICARUS_TREZOR"] = 2] = "ICARUS_TREZOR";
|
|
459
|
+
})(CardanoDerivationType || (CardanoDerivationType = {}));
|
|
460
|
+
var CardanoAddressType;
|
|
461
|
+
(function (CardanoAddressType) {
|
|
462
|
+
CardanoAddressType[CardanoAddressType["BASE"] = 0] = "BASE";
|
|
463
|
+
CardanoAddressType[CardanoAddressType["BASE_SCRIPT_KEY"] = 1] = "BASE_SCRIPT_KEY";
|
|
464
|
+
CardanoAddressType[CardanoAddressType["BASE_KEY_SCRIPT"] = 2] = "BASE_KEY_SCRIPT";
|
|
465
|
+
CardanoAddressType[CardanoAddressType["BASE_SCRIPT_SCRIPT"] = 3] = "BASE_SCRIPT_SCRIPT";
|
|
466
|
+
CardanoAddressType[CardanoAddressType["POINTER"] = 4] = "POINTER";
|
|
467
|
+
CardanoAddressType[CardanoAddressType["POINTER_SCRIPT"] = 5] = "POINTER_SCRIPT";
|
|
468
|
+
CardanoAddressType[CardanoAddressType["ENTERPRISE"] = 6] = "ENTERPRISE";
|
|
469
|
+
CardanoAddressType[CardanoAddressType["ENTERPRISE_SCRIPT"] = 7] = "ENTERPRISE_SCRIPT";
|
|
470
|
+
CardanoAddressType[CardanoAddressType["BYRON"] = 8] = "BYRON";
|
|
471
|
+
CardanoAddressType[CardanoAddressType["REWARD"] = 14] = "REWARD";
|
|
472
|
+
CardanoAddressType[CardanoAddressType["REWARD_SCRIPT"] = 15] = "REWARD_SCRIPT";
|
|
473
|
+
})(CardanoAddressType || (CardanoAddressType = {}));
|
|
474
|
+
var CardanoNativeScriptType;
|
|
475
|
+
(function (CardanoNativeScriptType) {
|
|
476
|
+
CardanoNativeScriptType[CardanoNativeScriptType["PUB_KEY"] = 0] = "PUB_KEY";
|
|
477
|
+
CardanoNativeScriptType[CardanoNativeScriptType["ALL"] = 1] = "ALL";
|
|
478
|
+
CardanoNativeScriptType[CardanoNativeScriptType["ANY"] = 2] = "ANY";
|
|
479
|
+
CardanoNativeScriptType[CardanoNativeScriptType["N_OF_K"] = 3] = "N_OF_K";
|
|
480
|
+
CardanoNativeScriptType[CardanoNativeScriptType["INVALID_BEFORE"] = 4] = "INVALID_BEFORE";
|
|
481
|
+
CardanoNativeScriptType[CardanoNativeScriptType["INVALID_HEREAFTER"] = 5] = "INVALID_HEREAFTER";
|
|
482
|
+
})(CardanoNativeScriptType || (CardanoNativeScriptType = {}));
|
|
483
|
+
var CardanoNativeScriptHashDisplayFormat;
|
|
484
|
+
(function (CardanoNativeScriptHashDisplayFormat) {
|
|
485
|
+
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["HIDE"] = 0] = "HIDE";
|
|
486
|
+
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["BECH32"] = 1] = "BECH32";
|
|
487
|
+
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["POLICY_ID"] = 2] = "POLICY_ID";
|
|
488
|
+
})(CardanoNativeScriptHashDisplayFormat || (CardanoNativeScriptHashDisplayFormat = {}));
|
|
489
|
+
var CardanoCertificateType;
|
|
490
|
+
(function (CardanoCertificateType) {
|
|
491
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_REGISTRATION"] = 0] = "STAKE_REGISTRATION";
|
|
492
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_DEREGISTRATION"] = 1] = "STAKE_DEREGISTRATION";
|
|
493
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_DELEGATION"] = 2] = "STAKE_DELEGATION";
|
|
494
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_POOL_REGISTRATION"] = 3] = "STAKE_POOL_REGISTRATION";
|
|
495
|
+
})(CardanoCertificateType || (CardanoCertificateType = {}));
|
|
496
|
+
var CardanoPoolRelayType;
|
|
497
|
+
(function (CardanoPoolRelayType) {
|
|
498
|
+
CardanoPoolRelayType[CardanoPoolRelayType["SINGLE_HOST_IP"] = 0] = "SINGLE_HOST_IP";
|
|
499
|
+
CardanoPoolRelayType[CardanoPoolRelayType["SINGLE_HOST_NAME"] = 1] = "SINGLE_HOST_NAME";
|
|
500
|
+
CardanoPoolRelayType[CardanoPoolRelayType["MULTIPLE_HOST_NAME"] = 2] = "MULTIPLE_HOST_NAME";
|
|
501
|
+
})(CardanoPoolRelayType || (CardanoPoolRelayType = {}));
|
|
502
|
+
var CardanoTxAuxiliaryDataSupplementType;
|
|
503
|
+
(function (CardanoTxAuxiliaryDataSupplementType) {
|
|
504
|
+
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["NONE"] = 0] = "NONE";
|
|
505
|
+
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["CATALYST_REGISTRATION_SIGNATURE"] = 1] = "CATALYST_REGISTRATION_SIGNATURE";
|
|
506
|
+
})(CardanoTxAuxiliaryDataSupplementType || (CardanoTxAuxiliaryDataSupplementType = {}));
|
|
507
|
+
var CardanoTxSigningMode;
|
|
508
|
+
(function (CardanoTxSigningMode) {
|
|
509
|
+
CardanoTxSigningMode[CardanoTxSigningMode["ORDINARY_TRANSACTION"] = 0] = "ORDINARY_TRANSACTION";
|
|
510
|
+
CardanoTxSigningMode[CardanoTxSigningMode["POOL_REGISTRATION_AS_OWNER"] = 1] = "POOL_REGISTRATION_AS_OWNER";
|
|
511
|
+
CardanoTxSigningMode[CardanoTxSigningMode["MULTISIG_TRANSACTION"] = 2] = "MULTISIG_TRANSACTION";
|
|
512
|
+
CardanoTxSigningMode[CardanoTxSigningMode["PLUTUS_TRANSACTION"] = 3] = "PLUTUS_TRANSACTION";
|
|
513
|
+
})(CardanoTxSigningMode || (CardanoTxSigningMode = {}));
|
|
514
|
+
var CardanoTxWitnessType;
|
|
515
|
+
(function (CardanoTxWitnessType) {
|
|
516
|
+
CardanoTxWitnessType[CardanoTxWitnessType["BYRON_WITNESS"] = 0] = "BYRON_WITNESS";
|
|
517
|
+
CardanoTxWitnessType[CardanoTxWitnessType["SHELLEY_WITNESS"] = 1] = "SHELLEY_WITNESS";
|
|
518
|
+
})(CardanoTxWitnessType || (CardanoTxWitnessType = {}));
|
|
519
|
+
var FailureType;
|
|
520
|
+
(function (FailureType) {
|
|
521
|
+
FailureType[FailureType["Failure_UnexpectedMessage"] = 1] = "Failure_UnexpectedMessage";
|
|
522
|
+
FailureType[FailureType["Failure_ButtonExpected"] = 2] = "Failure_ButtonExpected";
|
|
523
|
+
FailureType[FailureType["Failure_DataError"] = 3] = "Failure_DataError";
|
|
524
|
+
FailureType[FailureType["Failure_ActionCancelled"] = 4] = "Failure_ActionCancelled";
|
|
525
|
+
FailureType[FailureType["Failure_PinExpected"] = 5] = "Failure_PinExpected";
|
|
526
|
+
FailureType[FailureType["Failure_PinCancelled"] = 6] = "Failure_PinCancelled";
|
|
527
|
+
FailureType[FailureType["Failure_PinInvalid"] = 7] = "Failure_PinInvalid";
|
|
528
|
+
FailureType[FailureType["Failure_InvalidSignature"] = 8] = "Failure_InvalidSignature";
|
|
529
|
+
FailureType[FailureType["Failure_ProcessError"] = 9] = "Failure_ProcessError";
|
|
530
|
+
FailureType[FailureType["Failure_NotEnoughFunds"] = 10] = "Failure_NotEnoughFunds";
|
|
531
|
+
FailureType[FailureType["Failure_NotInitialized"] = 11] = "Failure_NotInitialized";
|
|
532
|
+
FailureType[FailureType["Failure_PinMismatch"] = 12] = "Failure_PinMismatch";
|
|
533
|
+
FailureType[FailureType["Failure_WipeCodeMismatch"] = 13] = "Failure_WipeCodeMismatch";
|
|
534
|
+
FailureType[FailureType["Failure_InvalidSession"] = 14] = "Failure_InvalidSession";
|
|
535
|
+
FailureType[FailureType["Failure_FirmwareError"] = 99] = "Failure_FirmwareError";
|
|
536
|
+
})(FailureType || (FailureType = {}));
|
|
537
|
+
var Enum_ButtonRequestType;
|
|
538
|
+
(function (Enum_ButtonRequestType) {
|
|
539
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Other"] = 1] = "ButtonRequest_Other";
|
|
540
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_FeeOverThreshold"] = 2] = "ButtonRequest_FeeOverThreshold";
|
|
541
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ConfirmOutput"] = 3] = "ButtonRequest_ConfirmOutput";
|
|
542
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ResetDevice"] = 4] = "ButtonRequest_ResetDevice";
|
|
543
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ConfirmWord"] = 5] = "ButtonRequest_ConfirmWord";
|
|
544
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_WipeDevice"] = 6] = "ButtonRequest_WipeDevice";
|
|
545
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ProtectCall"] = 7] = "ButtonRequest_ProtectCall";
|
|
546
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_SignTx"] = 8] = "ButtonRequest_SignTx";
|
|
547
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_FirmwareCheck"] = 9] = "ButtonRequest_FirmwareCheck";
|
|
548
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Address"] = 10] = "ButtonRequest_Address";
|
|
549
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PublicKey"] = 11] = "ButtonRequest_PublicKey";
|
|
550
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_MnemonicWordCount"] = 12] = "ButtonRequest_MnemonicWordCount";
|
|
551
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_MnemonicInput"] = 13] = "ButtonRequest_MnemonicInput";
|
|
552
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["_Deprecated_ButtonRequest_PassphraseType"] = 14] = "_Deprecated_ButtonRequest_PassphraseType";
|
|
553
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_UnknownDerivationPath"] = 15] = "ButtonRequest_UnknownDerivationPath";
|
|
554
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_RecoveryHomepage"] = 16] = "ButtonRequest_RecoveryHomepage";
|
|
555
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Success"] = 17] = "ButtonRequest_Success";
|
|
556
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Warning"] = 18] = "ButtonRequest_Warning";
|
|
557
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PassphraseEntry"] = 19] = "ButtonRequest_PassphraseEntry";
|
|
558
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PinEntry"] = 20] = "ButtonRequest_PinEntry";
|
|
559
|
+
})(Enum_ButtonRequestType || (Enum_ButtonRequestType = {}));
|
|
560
|
+
var Enum_PinMatrixRequestType;
|
|
561
|
+
(function (Enum_PinMatrixRequestType) {
|
|
562
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_Current"] = 1] = "PinMatrixRequestType_Current";
|
|
563
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_NewFirst"] = 2] = "PinMatrixRequestType_NewFirst";
|
|
564
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_NewSecond"] = 3] = "PinMatrixRequestType_NewSecond";
|
|
565
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_WipeCodeFirst"] = 4] = "PinMatrixRequestType_WipeCodeFirst";
|
|
566
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_WipeCodeSecond"] = 5] = "PinMatrixRequestType_WipeCodeSecond";
|
|
567
|
+
})(Enum_PinMatrixRequestType || (Enum_PinMatrixRequestType = {}));
|
|
568
|
+
var DebugButton;
|
|
569
|
+
(function (DebugButton) {
|
|
570
|
+
DebugButton[DebugButton["NO"] = 0] = "NO";
|
|
571
|
+
DebugButton[DebugButton["YES"] = 1] = "YES";
|
|
572
|
+
DebugButton[DebugButton["INFO"] = 2] = "INFO";
|
|
573
|
+
})(DebugButton || (DebugButton = {}));
|
|
574
|
+
var EthereumDataType;
|
|
575
|
+
(function (EthereumDataType) {
|
|
576
|
+
EthereumDataType[EthereumDataType["UINT"] = 1] = "UINT";
|
|
577
|
+
EthereumDataType[EthereumDataType["INT"] = 2] = "INT";
|
|
578
|
+
EthereumDataType[EthereumDataType["BYTES"] = 3] = "BYTES";
|
|
579
|
+
EthereumDataType[EthereumDataType["STRING"] = 4] = "STRING";
|
|
580
|
+
EthereumDataType[EthereumDataType["BOOL"] = 5] = "BOOL";
|
|
581
|
+
EthereumDataType[EthereumDataType["ADDRESS"] = 6] = "ADDRESS";
|
|
582
|
+
EthereumDataType[EthereumDataType["ARRAY"] = 7] = "ARRAY";
|
|
583
|
+
EthereumDataType[EthereumDataType["STRUCT"] = 8] = "STRUCT";
|
|
584
|
+
})(EthereumDataType || (EthereumDataType = {}));
|
|
585
|
+
var Enum_BackupType;
|
|
586
|
+
(function (Enum_BackupType) {
|
|
587
|
+
Enum_BackupType[Enum_BackupType["Bip39"] = 0] = "Bip39";
|
|
588
|
+
Enum_BackupType[Enum_BackupType["Slip39_Basic"] = 1] = "Slip39_Basic";
|
|
589
|
+
Enum_BackupType[Enum_BackupType["Slip39_Advanced"] = 2] = "Slip39_Advanced";
|
|
590
|
+
})(Enum_BackupType || (Enum_BackupType = {}));
|
|
591
|
+
var Enum_SafetyCheckLevel;
|
|
592
|
+
(function (Enum_SafetyCheckLevel) {
|
|
593
|
+
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["Strict"] = 0] = "Strict";
|
|
594
|
+
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["PromptAlways"] = 1] = "PromptAlways";
|
|
595
|
+
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["PromptTemporarily"] = 2] = "PromptTemporarily";
|
|
596
|
+
})(Enum_SafetyCheckLevel || (Enum_SafetyCheckLevel = {}));
|
|
597
|
+
var Enum_Capability;
|
|
598
|
+
(function (Enum_Capability) {
|
|
599
|
+
Enum_Capability[Enum_Capability["Capability_Bitcoin"] = 1] = "Capability_Bitcoin";
|
|
600
|
+
Enum_Capability[Enum_Capability["Capability_Bitcoin_like"] = 2] = "Capability_Bitcoin_like";
|
|
601
|
+
Enum_Capability[Enum_Capability["Capability_Binance"] = 3] = "Capability_Binance";
|
|
602
|
+
Enum_Capability[Enum_Capability["Capability_Cardano"] = 4] = "Capability_Cardano";
|
|
603
|
+
Enum_Capability[Enum_Capability["Capability_Crypto"] = 5] = "Capability_Crypto";
|
|
604
|
+
Enum_Capability[Enum_Capability["Capability_EOS"] = 6] = "Capability_EOS";
|
|
605
|
+
Enum_Capability[Enum_Capability["Capability_Ethereum"] = 7] = "Capability_Ethereum";
|
|
606
|
+
Enum_Capability[Enum_Capability["Capability_Lisk"] = 8] = "Capability_Lisk";
|
|
607
|
+
Enum_Capability[Enum_Capability["Capability_Monero"] = 9] = "Capability_Monero";
|
|
608
|
+
Enum_Capability[Enum_Capability["Capability_NEM"] = 10] = "Capability_NEM";
|
|
609
|
+
Enum_Capability[Enum_Capability["Capability_Ripple"] = 11] = "Capability_Ripple";
|
|
610
|
+
Enum_Capability[Enum_Capability["Capability_Stellar"] = 12] = "Capability_Stellar";
|
|
611
|
+
Enum_Capability[Enum_Capability["Capability_Tezos"] = 13] = "Capability_Tezos";
|
|
612
|
+
Enum_Capability[Enum_Capability["Capability_U2F"] = 14] = "Capability_U2F";
|
|
613
|
+
Enum_Capability[Enum_Capability["Capability_Shamir"] = 15] = "Capability_Shamir";
|
|
614
|
+
Enum_Capability[Enum_Capability["Capability_ShamirGroups"] = 16] = "Capability_ShamirGroups";
|
|
615
|
+
Enum_Capability[Enum_Capability["Capability_PassphraseEntry"] = 17] = "Capability_PassphraseEntry";
|
|
616
|
+
})(Enum_Capability || (Enum_Capability = {}));
|
|
617
|
+
var SdProtectOperationType;
|
|
618
|
+
(function (SdProtectOperationType) {
|
|
619
|
+
SdProtectOperationType[SdProtectOperationType["DISABLE"] = 0] = "DISABLE";
|
|
620
|
+
SdProtectOperationType[SdProtectOperationType["ENABLE"] = 1] = "ENABLE";
|
|
621
|
+
SdProtectOperationType[SdProtectOperationType["REFRESH"] = 2] = "REFRESH";
|
|
622
|
+
})(SdProtectOperationType || (SdProtectOperationType = {}));
|
|
623
|
+
var RecoveryDeviceType;
|
|
624
|
+
(function (RecoveryDeviceType) {
|
|
625
|
+
RecoveryDeviceType[RecoveryDeviceType["RecoveryDeviceType_ScrambledWords"] = 0] = "RecoveryDeviceType_ScrambledWords";
|
|
626
|
+
RecoveryDeviceType[RecoveryDeviceType["RecoveryDeviceType_Matrix"] = 1] = "RecoveryDeviceType_Matrix";
|
|
627
|
+
})(RecoveryDeviceType || (RecoveryDeviceType = {}));
|
|
628
|
+
var Enum_WordRequestType;
|
|
629
|
+
(function (Enum_WordRequestType) {
|
|
630
|
+
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Plain"] = 0] = "WordRequestType_Plain";
|
|
631
|
+
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Matrix9"] = 1] = "WordRequestType_Matrix9";
|
|
632
|
+
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Matrix6"] = 2] = "WordRequestType_Matrix6";
|
|
633
|
+
})(Enum_WordRequestType || (Enum_WordRequestType = {}));
|
|
634
|
+
var NEMMosaicLevy;
|
|
635
|
+
(function (NEMMosaicLevy) {
|
|
636
|
+
NEMMosaicLevy[NEMMosaicLevy["MosaicLevy_Absolute"] = 1] = "MosaicLevy_Absolute";
|
|
637
|
+
NEMMosaicLevy[NEMMosaicLevy["MosaicLevy_Percentile"] = 2] = "MosaicLevy_Percentile";
|
|
638
|
+
})(NEMMosaicLevy || (NEMMosaicLevy = {}));
|
|
639
|
+
var NEMSupplyChangeType;
|
|
640
|
+
(function (NEMSupplyChangeType) {
|
|
641
|
+
NEMSupplyChangeType[NEMSupplyChangeType["SupplyChange_Increase"] = 1] = "SupplyChange_Increase";
|
|
642
|
+
NEMSupplyChangeType[NEMSupplyChangeType["SupplyChange_Decrease"] = 2] = "SupplyChange_Decrease";
|
|
643
|
+
})(NEMSupplyChangeType || (NEMSupplyChangeType = {}));
|
|
644
|
+
var NEMModificationType;
|
|
645
|
+
(function (NEMModificationType) {
|
|
646
|
+
NEMModificationType[NEMModificationType["CosignatoryModification_Add"] = 1] = "CosignatoryModification_Add";
|
|
647
|
+
NEMModificationType[NEMModificationType["CosignatoryModification_Delete"] = 2] = "CosignatoryModification_Delete";
|
|
648
|
+
})(NEMModificationType || (NEMModificationType = {}));
|
|
649
|
+
var NEMImportanceTransferMode;
|
|
650
|
+
(function (NEMImportanceTransferMode) {
|
|
651
|
+
NEMImportanceTransferMode[NEMImportanceTransferMode["ImportanceTransfer_Activate"] = 1] = "ImportanceTransfer_Activate";
|
|
652
|
+
NEMImportanceTransferMode[NEMImportanceTransferMode["ImportanceTransfer_Deactivate"] = 2] = "ImportanceTransfer_Deactivate";
|
|
653
|
+
})(NEMImportanceTransferMode || (NEMImportanceTransferMode = {}));
|
|
654
|
+
var StellarAssetType;
|
|
655
|
+
(function (StellarAssetType) {
|
|
656
|
+
StellarAssetType[StellarAssetType["NATIVE"] = 0] = "NATIVE";
|
|
657
|
+
StellarAssetType[StellarAssetType["ALPHANUM4"] = 1] = "ALPHANUM4";
|
|
658
|
+
StellarAssetType[StellarAssetType["ALPHANUM12"] = 2] = "ALPHANUM12";
|
|
659
|
+
})(StellarAssetType || (StellarAssetType = {}));
|
|
660
|
+
var StellarMemoType;
|
|
661
|
+
(function (StellarMemoType) {
|
|
662
|
+
StellarMemoType[StellarMemoType["NONE"] = 0] = "NONE";
|
|
663
|
+
StellarMemoType[StellarMemoType["TEXT"] = 1] = "TEXT";
|
|
664
|
+
StellarMemoType[StellarMemoType["ID"] = 2] = "ID";
|
|
665
|
+
StellarMemoType[StellarMemoType["HASH"] = 3] = "HASH";
|
|
666
|
+
StellarMemoType[StellarMemoType["RETURN"] = 4] = "RETURN";
|
|
667
|
+
})(StellarMemoType || (StellarMemoType = {}));
|
|
668
|
+
var StellarSignerType;
|
|
669
|
+
(function (StellarSignerType) {
|
|
670
|
+
StellarSignerType[StellarSignerType["ACCOUNT"] = 0] = "ACCOUNT";
|
|
671
|
+
StellarSignerType[StellarSignerType["PRE_AUTH"] = 1] = "PRE_AUTH";
|
|
672
|
+
StellarSignerType[StellarSignerType["HASH"] = 2] = "HASH";
|
|
673
|
+
})(StellarSignerType || (StellarSignerType = {}));
|
|
674
|
+
var TezosContractType;
|
|
675
|
+
(function (TezosContractType) {
|
|
676
|
+
TezosContractType[TezosContractType["Implicit"] = 0] = "Implicit";
|
|
677
|
+
TezosContractType[TezosContractType["Originated"] = 1] = "Originated";
|
|
678
|
+
})(TezosContractType || (TezosContractType = {}));
|
|
679
|
+
var TezosBallotType;
|
|
680
|
+
(function (TezosBallotType) {
|
|
681
|
+
TezosBallotType[TezosBallotType["Yay"] = 0] = "Yay";
|
|
682
|
+
TezosBallotType[TezosBallotType["Nay"] = 1] = "Nay";
|
|
683
|
+
TezosBallotType[TezosBallotType["Pass"] = 2] = "Pass";
|
|
684
|
+
})(TezosBallotType || (TezosBallotType = {}));
|
|
685
|
+
|
|
686
|
+
var messages = /*#__PURE__*/Object.freeze({
|
|
687
|
+
__proto__: null,
|
|
688
|
+
get BinanceOrderType () { return BinanceOrderType; },
|
|
689
|
+
get BinanceOrderSide () { return BinanceOrderSide; },
|
|
690
|
+
get BinanceTimeInForce () { return BinanceTimeInForce; },
|
|
691
|
+
get Enum_InputScriptType () { return Enum_InputScriptType; },
|
|
692
|
+
get Enum_OutputScriptType () { return Enum_OutputScriptType; },
|
|
693
|
+
get DecredStakingSpendType () { return DecredStakingSpendType; },
|
|
694
|
+
get AmountUnit () { return AmountUnit; },
|
|
695
|
+
get Enum_RequestType () { return Enum_RequestType; },
|
|
696
|
+
get CardanoDerivationType () { return CardanoDerivationType; },
|
|
697
|
+
get CardanoAddressType () { return CardanoAddressType; },
|
|
698
|
+
get CardanoNativeScriptType () { return CardanoNativeScriptType; },
|
|
699
|
+
get CardanoNativeScriptHashDisplayFormat () { return CardanoNativeScriptHashDisplayFormat; },
|
|
700
|
+
get CardanoCertificateType () { return CardanoCertificateType; },
|
|
701
|
+
get CardanoPoolRelayType () { return CardanoPoolRelayType; },
|
|
702
|
+
get CardanoTxAuxiliaryDataSupplementType () { return CardanoTxAuxiliaryDataSupplementType; },
|
|
703
|
+
get CardanoTxSigningMode () { return CardanoTxSigningMode; },
|
|
704
|
+
get CardanoTxWitnessType () { return CardanoTxWitnessType; },
|
|
705
|
+
get FailureType () { return FailureType; },
|
|
706
|
+
get Enum_ButtonRequestType () { return Enum_ButtonRequestType; },
|
|
707
|
+
get Enum_PinMatrixRequestType () { return Enum_PinMatrixRequestType; },
|
|
708
|
+
get DebugButton () { return DebugButton; },
|
|
709
|
+
get EthereumDataType () { return EthereumDataType; },
|
|
710
|
+
get Enum_BackupType () { return Enum_BackupType; },
|
|
711
|
+
get Enum_SafetyCheckLevel () { return Enum_SafetyCheckLevel; },
|
|
712
|
+
get Enum_Capability () { return Enum_Capability; },
|
|
713
|
+
get SdProtectOperationType () { return SdProtectOperationType; },
|
|
714
|
+
get RecoveryDeviceType () { return RecoveryDeviceType; },
|
|
715
|
+
get Enum_WordRequestType () { return Enum_WordRequestType; },
|
|
716
|
+
get NEMMosaicLevy () { return NEMMosaicLevy; },
|
|
717
|
+
get NEMSupplyChangeType () { return NEMSupplyChangeType; },
|
|
718
|
+
get NEMModificationType () { return NEMModificationType; },
|
|
719
|
+
get NEMImportanceTransferMode () { return NEMImportanceTransferMode; },
|
|
720
|
+
get StellarAssetType () { return StellarAssetType; },
|
|
721
|
+
get StellarMemoType () { return StellarMemoType; },
|
|
722
|
+
get StellarSignerType () { return StellarSignerType; },
|
|
723
|
+
get TezosContractType () { return TezosContractType; },
|
|
724
|
+
get TezosBallotType () { return TezosBallotType; }
|
|
725
|
+
});
|
|
726
|
+
|
|
727
|
+
protobuf__namespace.util.Long = Long__namespace;
|
|
728
|
+
protobuf__namespace.configure();
|
|
729
|
+
var index = {
|
|
730
|
+
check,
|
|
731
|
+
buildOne,
|
|
732
|
+
buildBuffer,
|
|
733
|
+
receiveOne,
|
|
734
|
+
parseConfigure,
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
exports.BUFFER_SIZE = BUFFER_SIZE;
|
|
738
|
+
exports.HEADER_SIZE = HEADER_SIZE;
|
|
739
|
+
exports.MESSAGE_HEADER_BYTE = MESSAGE_HEADER_BYTE;
|
|
740
|
+
exports.MESSAGE_TOP_CHAR = MESSAGE_TOP_CHAR;
|
|
741
|
+
exports.Messages = messages;
|
|
742
|
+
exports["default"] = index;
|