@ukeyfe/hardware-transport 1.1.13
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 +24 -0
- package/README.md +29 -0
- package/__tests__/build-receive.test.js +117 -0
- package/__tests__/decode-features.test.js +72 -0
- package/__tests__/encode-decode-basic.test.js +272 -0
- package/__tests__/encode-decode.test.js +532 -0
- package/__tests__/messages.test.js +86 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/index.d.ts +5203 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +942 -0
- package/dist/serialization/index.d.ts +6 -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 +7 -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 +3762 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/transport.d.ts +62 -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/logBlockCommand.d.ts +2 -0
- package/dist/utils/logBlockCommand.d.ts.map +1 -0
- package/dist/utils/protobuf.d.ts +2 -0
- package/dist/utils/protobuf.d.ts.map +1 -0
- package/jest.config.js +7 -0
- package/package.json +31 -0
- package/protocol.md +21 -0
- package/scripts/protobuf-build.sh +58 -0
- package/scripts/protobuf-patches/TxAck.js +44 -0
- package/scripts/protobuf-patches/TxInputType.js +49 -0
- package/scripts/protobuf-patches/TxOutputType.js +50 -0
- package/scripts/protobuf-patches/index.js +274 -0
- package/scripts/protobuf-types.js +283 -0
- package/src/constants.ts +8 -0
- package/src/index.ts +41 -0
- package/src/serialization/index.ts +8 -0
- package/src/serialization/protobuf/decode.ts +95 -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 +56 -0
- package/src/types/index.ts +2 -0
- package/src/types/messages.ts +4864 -0
- package/src/types/transport.ts +71 -0
- package/src/utils/highlevel-checks.ts +88 -0
- package/src/utils/logBlockCommand.ts +1 -0
- package/src/utils/protobuf.ts +24 -0
- package/tsconfig.json +11 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,942 @@
|
|
|
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
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
62
|
+
var e = new Error(message);
|
|
63
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const primitiveTypes = [
|
|
67
|
+
'bool',
|
|
68
|
+
'string',
|
|
69
|
+
'bytes',
|
|
70
|
+
'int32',
|
|
71
|
+
'int64',
|
|
72
|
+
'uint32',
|
|
73
|
+
'uint64',
|
|
74
|
+
'sint32',
|
|
75
|
+
'sint64',
|
|
76
|
+
'fixed32',
|
|
77
|
+
'fixed64',
|
|
78
|
+
'sfixed32',
|
|
79
|
+
'sfixed64',
|
|
80
|
+
'double',
|
|
81
|
+
'float',
|
|
82
|
+
];
|
|
83
|
+
const isPrimitiveField = (field) => primitiveTypes.includes(field);
|
|
84
|
+
|
|
85
|
+
const transform$1 = (field, value) => {
|
|
86
|
+
if ((field === null || field === void 0 ? void 0 : field.optional) && typeof value === 'undefined') {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
if ((field === null || field === void 0 ? void 0 : field.type) === 'bytes') {
|
|
90
|
+
return ByteBuffer__default["default"].wrap(value).toString('hex');
|
|
91
|
+
}
|
|
92
|
+
if (field === null || field === void 0 ? void 0 : field.long) {
|
|
93
|
+
if (Number.isSafeInteger(value.toNumber())) {
|
|
94
|
+
return value.toNumber();
|
|
95
|
+
}
|
|
96
|
+
return value.toString();
|
|
97
|
+
}
|
|
98
|
+
return value;
|
|
99
|
+
};
|
|
100
|
+
function messageToJSON(Message, fields) {
|
|
101
|
+
const message = __rest(Message, []);
|
|
102
|
+
const res = {};
|
|
103
|
+
Object.keys(fields).forEach(key => {
|
|
104
|
+
const field = fields[key];
|
|
105
|
+
const value = message[key];
|
|
106
|
+
if (field.repeated) {
|
|
107
|
+
if (isPrimitiveField(field.type)) {
|
|
108
|
+
res[key] = value.map((v) => transform$1(field, v));
|
|
109
|
+
}
|
|
110
|
+
else if ('valuesById' in field.resolvedType) {
|
|
111
|
+
res[key] = value;
|
|
112
|
+
}
|
|
113
|
+
else if ('fields' in field.resolvedType) {
|
|
114
|
+
res[key] = value.map((v) => messageToJSON(v, field.resolvedType.fields));
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
throw new Error(`case not handled for repeated key: ${key}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else if (isPrimitiveField(field.type)) {
|
|
121
|
+
res[key] = transform$1(field, value);
|
|
122
|
+
}
|
|
123
|
+
else if ('valuesById' in field.resolvedType) {
|
|
124
|
+
res[key] = field.resolvedType.valuesById[value];
|
|
125
|
+
}
|
|
126
|
+
else if (field.resolvedType.fields) {
|
|
127
|
+
res[key] = messageToJSON(value, field.resolvedType.fields);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
throw new Error(`case not handled: ${key}`);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
return res;
|
|
134
|
+
}
|
|
135
|
+
const decode$1 = (Message, data) => {
|
|
136
|
+
const buff = data.toBuffer();
|
|
137
|
+
const a = new Uint8Array(buff);
|
|
138
|
+
let decoded;
|
|
139
|
+
try {
|
|
140
|
+
decoded = Message.decode(a);
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
if (a.length > 1 && a[a.length - 1] === 0xff) {
|
|
144
|
+
a[a.length - 1] = 0x04;
|
|
145
|
+
decoded = Message.decode(a);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
throw error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return messageToJSON(decoded, decoded.$type.fields);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const transform = (fieldType, value) => {
|
|
155
|
+
if (fieldType === 'bytes') {
|
|
156
|
+
if (typeof value === 'string' && !value)
|
|
157
|
+
return value;
|
|
158
|
+
return buffer.Buffer.from(value, 'hex');
|
|
159
|
+
}
|
|
160
|
+
if (typeof value === 'number' && !Number.isSafeInteger(value)) {
|
|
161
|
+
throw new RangeError('field value is not within safe integer range');
|
|
162
|
+
}
|
|
163
|
+
return value;
|
|
164
|
+
};
|
|
165
|
+
function patch(Message, payload) {
|
|
166
|
+
const patched = {};
|
|
167
|
+
if (!Message.fields) {
|
|
168
|
+
return patched;
|
|
169
|
+
}
|
|
170
|
+
Object.keys(Message.fields).forEach(key => {
|
|
171
|
+
const field = Message.fields[key];
|
|
172
|
+
const value = payload[key];
|
|
173
|
+
if (typeof value === 'undefined') {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (field && isPrimitiveField(field.type)) {
|
|
177
|
+
if (field.repeated) {
|
|
178
|
+
patched[key] = value.map((v) => transform(field.type, v));
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
patched[key] = transform(field.type, value);
|
|
182
|
+
}
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (field.repeated) {
|
|
186
|
+
const RefMessage = Message.lookupTypeOrEnum(field.type);
|
|
187
|
+
patched[key] = value.map((v) => patch(RefMessage, v));
|
|
188
|
+
}
|
|
189
|
+
else if (typeof value === 'object' && value !== null) {
|
|
190
|
+
const RefMessage = Message.lookupType(field.type);
|
|
191
|
+
patched[key] = patch(RefMessage, value);
|
|
192
|
+
}
|
|
193
|
+
else if (typeof value === 'number') {
|
|
194
|
+
const RefMessage = Message.lookupEnum(field.type);
|
|
195
|
+
patched[key] = RefMessage.values[value];
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
patched[key] = value;
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
return patched;
|
|
202
|
+
}
|
|
203
|
+
const encode$1 = (Message, data) => {
|
|
204
|
+
const payload = patch(Message, data);
|
|
205
|
+
const message = Message.fromObject(payload);
|
|
206
|
+
const buffer = Message.encode(message).finish();
|
|
207
|
+
const bytebuffer = new ByteBuffer__default["default"](buffer.byteLength);
|
|
208
|
+
bytebuffer.append(buffer);
|
|
209
|
+
bytebuffer.reset();
|
|
210
|
+
return bytebuffer;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
function parseConfigure(data) {
|
|
214
|
+
if (typeof data === 'string') {
|
|
215
|
+
return protobuf__namespace.Root.fromJSON(JSON.parse(data));
|
|
216
|
+
}
|
|
217
|
+
return protobuf__namespace.Root.fromJSON(data);
|
|
218
|
+
}
|
|
219
|
+
const createMessageFromName = (messages, name) => {
|
|
220
|
+
const Message = messages.lookupType(name);
|
|
221
|
+
const MessageType = messages.lookupEnum('MessageType');
|
|
222
|
+
let messageType = MessageType.values[`MessageType_${name}`];
|
|
223
|
+
if (!messageType && Message.options) {
|
|
224
|
+
messageType = Message.options['(wire_type)'];
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
Message,
|
|
228
|
+
messageType,
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
const createMessageFromType = (messages, typeId) => {
|
|
232
|
+
const MessageType = messages.lookupEnum('MessageType');
|
|
233
|
+
const messageName = MessageType.valuesById[typeId].replace('MessageType_', '');
|
|
234
|
+
const Message = messages.lookupType(messageName);
|
|
235
|
+
return {
|
|
236
|
+
Message,
|
|
237
|
+
messageName,
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const MESSAGE_TOP_CHAR = 0x003f;
|
|
242
|
+
const MESSAGE_HEADER_BYTE = 0x23;
|
|
243
|
+
const HEADER_SIZE = 1 + 1 + 4 + 2;
|
|
244
|
+
const BUFFER_SIZE = 63;
|
|
245
|
+
const COMMON_HEADER_SIZE = 6;
|
|
246
|
+
|
|
247
|
+
const readHeader = (buffer) => {
|
|
248
|
+
const typeId = buffer.readUint16();
|
|
249
|
+
const length = buffer.readUint32();
|
|
250
|
+
return { typeId, length };
|
|
251
|
+
};
|
|
252
|
+
const readHeaderChunked = (buffer) => {
|
|
253
|
+
const sharp1 = buffer.readByte();
|
|
254
|
+
const sharp2 = buffer.readByte();
|
|
255
|
+
const typeId = buffer.readUint16();
|
|
256
|
+
const length = buffer.readUint32();
|
|
257
|
+
return { sharp1, sharp2, typeId, length };
|
|
258
|
+
};
|
|
259
|
+
const decode = (byteBuffer) => {
|
|
260
|
+
const { typeId } = readHeader(byteBuffer);
|
|
261
|
+
return {
|
|
262
|
+
typeId,
|
|
263
|
+
buffer: byteBuffer,
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
const decodeChunked = (bytes) => {
|
|
267
|
+
const byteBuffer = ByteBuffer__default["default"].wrap(bytes, undefined, undefined, true);
|
|
268
|
+
const { sharp1, sharp2, typeId, length } = readHeaderChunked(byteBuffer);
|
|
269
|
+
if (sharp1 !== MESSAGE_HEADER_BYTE || sharp2 !== MESSAGE_HEADER_BYTE) {
|
|
270
|
+
throw new Error("Didn't receive expected header signature.");
|
|
271
|
+
}
|
|
272
|
+
return { length, typeId, restBuffer: byteBuffer };
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
var decodeProtocol = /*#__PURE__*/Object.freeze({
|
|
276
|
+
__proto__: null,
|
|
277
|
+
decode: decode,
|
|
278
|
+
decodeChunked: decodeChunked
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
function encode(data, options) {
|
|
282
|
+
const { addTrezorHeaders, chunked, messageType } = options;
|
|
283
|
+
const fullSize = (addTrezorHeaders ? HEADER_SIZE : HEADER_SIZE - 2) + data.limit;
|
|
284
|
+
const encodedByteBuffer = new ByteBuffer__default["default"](fullSize);
|
|
285
|
+
if (addTrezorHeaders) {
|
|
286
|
+
encodedByteBuffer.writeByte(MESSAGE_HEADER_BYTE);
|
|
287
|
+
encodedByteBuffer.writeByte(MESSAGE_HEADER_BYTE);
|
|
288
|
+
}
|
|
289
|
+
encodedByteBuffer.writeUint16(messageType);
|
|
290
|
+
encodedByteBuffer.writeUint32(data.limit);
|
|
291
|
+
encodedByteBuffer.append(data.buffer);
|
|
292
|
+
encodedByteBuffer.reset();
|
|
293
|
+
if (chunked === false) {
|
|
294
|
+
return encodedByteBuffer;
|
|
295
|
+
}
|
|
296
|
+
const result = [];
|
|
297
|
+
const size = BUFFER_SIZE;
|
|
298
|
+
const count = Math.floor((encodedByteBuffer.limit - 1) / size) + 1 || 1;
|
|
299
|
+
for (let i = 0; i < count; i++) {
|
|
300
|
+
const start = i * size;
|
|
301
|
+
const end = Math.min((i + 1) * size, encodedByteBuffer.limit);
|
|
302
|
+
const slice = encodedByteBuffer.slice(start, end);
|
|
303
|
+
slice.compact();
|
|
304
|
+
result.push(slice.buffer);
|
|
305
|
+
}
|
|
306
|
+
return result;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
function buildOne(messages, name, data) {
|
|
310
|
+
const { Message, messageType } = createMessageFromName(messages, name);
|
|
311
|
+
const buffer = encode$1(Message, data);
|
|
312
|
+
return encode(buffer, {
|
|
313
|
+
addTrezorHeaders: false,
|
|
314
|
+
chunked: false,
|
|
315
|
+
messageType,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
const buildEncodeBuffers = (messages, name, data) => {
|
|
319
|
+
const { Message, messageType } = createMessageFromName(messages, name);
|
|
320
|
+
const buffer = encode$1(Message, data);
|
|
321
|
+
return encode(buffer, {
|
|
322
|
+
addTrezorHeaders: true,
|
|
323
|
+
chunked: true,
|
|
324
|
+
messageType,
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
const buildBuffers = (messages, name, data) => {
|
|
328
|
+
const encodeBuffers = buildEncodeBuffers(messages, name, data);
|
|
329
|
+
const outBuffers = [];
|
|
330
|
+
for (const buf of encodeBuffers) {
|
|
331
|
+
const chunkBuffer = new ByteBuffer__default["default"](BUFFER_SIZE + 1);
|
|
332
|
+
chunkBuffer.writeByte(MESSAGE_TOP_CHAR);
|
|
333
|
+
chunkBuffer.append(buf);
|
|
334
|
+
chunkBuffer.reset();
|
|
335
|
+
outBuffers.push(chunkBuffer);
|
|
336
|
+
}
|
|
337
|
+
return outBuffers;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
function receiveOne(messages, data) {
|
|
341
|
+
const bytebuffer = ByteBuffer__default["default"].wrap(data, 'hex');
|
|
342
|
+
const { typeId, buffer } = decode(bytebuffer);
|
|
343
|
+
const { Message, messageName } = createMessageFromType(messages, typeId);
|
|
344
|
+
const message = decode$1(Message, buffer);
|
|
345
|
+
return {
|
|
346
|
+
message,
|
|
347
|
+
type: messageName,
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const ERROR = 'Wrong result type.';
|
|
352
|
+
function info(res) {
|
|
353
|
+
if (typeof res !== 'object' || res == null) {
|
|
354
|
+
throw new Error('Wrong result type.');
|
|
355
|
+
}
|
|
356
|
+
const { version } = res;
|
|
357
|
+
if (typeof version !== 'string') {
|
|
358
|
+
throw new Error(ERROR);
|
|
359
|
+
}
|
|
360
|
+
const configured = !!res.configured;
|
|
361
|
+
return { version, configured };
|
|
362
|
+
}
|
|
363
|
+
function version(version) {
|
|
364
|
+
if (typeof version !== 'string') {
|
|
365
|
+
throw new Error(ERROR);
|
|
366
|
+
}
|
|
367
|
+
return version.trim();
|
|
368
|
+
}
|
|
369
|
+
function convertSession(r) {
|
|
370
|
+
if (r == null) {
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
if (typeof r !== 'string') {
|
|
374
|
+
throw new Error(ERROR);
|
|
375
|
+
}
|
|
376
|
+
return r;
|
|
377
|
+
}
|
|
378
|
+
function devices(res) {
|
|
379
|
+
if (typeof res !== 'object') {
|
|
380
|
+
throw new Error(ERROR);
|
|
381
|
+
}
|
|
382
|
+
if (!(res instanceof Array)) {
|
|
383
|
+
throw new Error(ERROR);
|
|
384
|
+
}
|
|
385
|
+
return res.map((o) => {
|
|
386
|
+
if (typeof o !== 'object' || o == null) {
|
|
387
|
+
throw new Error(ERROR);
|
|
388
|
+
}
|
|
389
|
+
const { path } = o;
|
|
390
|
+
if (typeof path !== 'string') {
|
|
391
|
+
throw new Error(ERROR);
|
|
392
|
+
}
|
|
393
|
+
const pathS = path.toString();
|
|
394
|
+
return {
|
|
395
|
+
path: pathS,
|
|
396
|
+
session: convertSession(o.session),
|
|
397
|
+
debugSession: convertSession(o.debugSession),
|
|
398
|
+
product: o.product,
|
|
399
|
+
vendor: o.vendor,
|
|
400
|
+
debug: !!o.debug,
|
|
401
|
+
};
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
function acquire(res) {
|
|
405
|
+
if (typeof res !== 'object' || res == null) {
|
|
406
|
+
throw new Error(ERROR);
|
|
407
|
+
}
|
|
408
|
+
const { session } = res;
|
|
409
|
+
if (typeof session !== 'string' && typeof session !== 'number') {
|
|
410
|
+
throw new Error(ERROR);
|
|
411
|
+
}
|
|
412
|
+
return session.toString();
|
|
413
|
+
}
|
|
414
|
+
function call(res) {
|
|
415
|
+
if (typeof res !== 'object' || res == null) {
|
|
416
|
+
throw new Error(ERROR);
|
|
417
|
+
}
|
|
418
|
+
const { type } = res;
|
|
419
|
+
if (typeof type !== 'string') {
|
|
420
|
+
throw new Error(ERROR);
|
|
421
|
+
}
|
|
422
|
+
const { message } = res;
|
|
423
|
+
if (typeof message !== 'object' || message == null) {
|
|
424
|
+
throw new Error(ERROR);
|
|
425
|
+
}
|
|
426
|
+
return { type, message };
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
var check = /*#__PURE__*/Object.freeze({
|
|
430
|
+
__proto__: null,
|
|
431
|
+
info: info,
|
|
432
|
+
version: version,
|
|
433
|
+
devices: devices,
|
|
434
|
+
acquire: acquire,
|
|
435
|
+
call: call
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
exports.AptosTransactionType = void 0;
|
|
439
|
+
(function (AptosTransactionType) {
|
|
440
|
+
AptosTransactionType[AptosTransactionType["STANDARD"] = 0] = "STANDARD";
|
|
441
|
+
AptosTransactionType[AptosTransactionType["WITH_DATA"] = 1] = "WITH_DATA";
|
|
442
|
+
})(exports.AptosTransactionType || (exports.AptosTransactionType = {}));
|
|
443
|
+
exports.BinanceOrderType = void 0;
|
|
444
|
+
(function (BinanceOrderType) {
|
|
445
|
+
BinanceOrderType[BinanceOrderType["OT_UNKNOWN"] = 0] = "OT_UNKNOWN";
|
|
446
|
+
BinanceOrderType[BinanceOrderType["MARKET"] = 1] = "MARKET";
|
|
447
|
+
BinanceOrderType[BinanceOrderType["LIMIT"] = 2] = "LIMIT";
|
|
448
|
+
BinanceOrderType[BinanceOrderType["OT_RESERVED"] = 3] = "OT_RESERVED";
|
|
449
|
+
})(exports.BinanceOrderType || (exports.BinanceOrderType = {}));
|
|
450
|
+
exports.BinanceOrderSide = void 0;
|
|
451
|
+
(function (BinanceOrderSide) {
|
|
452
|
+
BinanceOrderSide[BinanceOrderSide["SIDE_UNKNOWN"] = 0] = "SIDE_UNKNOWN";
|
|
453
|
+
BinanceOrderSide[BinanceOrderSide["BUY"] = 1] = "BUY";
|
|
454
|
+
BinanceOrderSide[BinanceOrderSide["SELL"] = 2] = "SELL";
|
|
455
|
+
})(exports.BinanceOrderSide || (exports.BinanceOrderSide = {}));
|
|
456
|
+
exports.BinanceTimeInForce = void 0;
|
|
457
|
+
(function (BinanceTimeInForce) {
|
|
458
|
+
BinanceTimeInForce[BinanceTimeInForce["TIF_UNKNOWN"] = 0] = "TIF_UNKNOWN";
|
|
459
|
+
BinanceTimeInForce[BinanceTimeInForce["GTE"] = 1] = "GTE";
|
|
460
|
+
BinanceTimeInForce[BinanceTimeInForce["TIF_RESERVED"] = 2] = "TIF_RESERVED";
|
|
461
|
+
BinanceTimeInForce[BinanceTimeInForce["IOC"] = 3] = "IOC";
|
|
462
|
+
})(exports.BinanceTimeInForce || (exports.BinanceTimeInForce = {}));
|
|
463
|
+
exports.Enum_InputScriptType = void 0;
|
|
464
|
+
(function (Enum_InputScriptType) {
|
|
465
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDADDRESS"] = 0] = "SPENDADDRESS";
|
|
466
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDMULTISIG"] = 1] = "SPENDMULTISIG";
|
|
467
|
+
Enum_InputScriptType[Enum_InputScriptType["EXTERNAL"] = 2] = "EXTERNAL";
|
|
468
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDWITNESS"] = 3] = "SPENDWITNESS";
|
|
469
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDP2SHWITNESS"] = 4] = "SPENDP2SHWITNESS";
|
|
470
|
+
Enum_InputScriptType[Enum_InputScriptType["SPENDTAPROOT"] = 5] = "SPENDTAPROOT";
|
|
471
|
+
})(exports.Enum_InputScriptType || (exports.Enum_InputScriptType = {}));
|
|
472
|
+
exports.Enum_OutputScriptType = void 0;
|
|
473
|
+
(function (Enum_OutputScriptType) {
|
|
474
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOADDRESS"] = 0] = "PAYTOADDRESS";
|
|
475
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOSCRIPTHASH"] = 1] = "PAYTOSCRIPTHASH";
|
|
476
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOMULTISIG"] = 2] = "PAYTOMULTISIG";
|
|
477
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOOPRETURN"] = 3] = "PAYTOOPRETURN";
|
|
478
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOWITNESS"] = 4] = "PAYTOWITNESS";
|
|
479
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOP2SHWITNESS"] = 5] = "PAYTOP2SHWITNESS";
|
|
480
|
+
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOTAPROOT"] = 6] = "PAYTOTAPROOT";
|
|
481
|
+
})(exports.Enum_OutputScriptType || (exports.Enum_OutputScriptType = {}));
|
|
482
|
+
exports.DecredStakingSpendType = void 0;
|
|
483
|
+
(function (DecredStakingSpendType) {
|
|
484
|
+
DecredStakingSpendType[DecredStakingSpendType["SSGen"] = 0] = "SSGen";
|
|
485
|
+
DecredStakingSpendType[DecredStakingSpendType["SSRTX"] = 1] = "SSRTX";
|
|
486
|
+
})(exports.DecredStakingSpendType || (exports.DecredStakingSpendType = {}));
|
|
487
|
+
exports.AmountUnit = void 0;
|
|
488
|
+
(function (AmountUnit) {
|
|
489
|
+
AmountUnit[AmountUnit["BITCOIN"] = 0] = "BITCOIN";
|
|
490
|
+
AmountUnit[AmountUnit["MILLIBITCOIN"] = 1] = "MILLIBITCOIN";
|
|
491
|
+
AmountUnit[AmountUnit["MICROBITCOIN"] = 2] = "MICROBITCOIN";
|
|
492
|
+
AmountUnit[AmountUnit["SATOSHI"] = 3] = "SATOSHI";
|
|
493
|
+
})(exports.AmountUnit || (exports.AmountUnit = {}));
|
|
494
|
+
exports.Enum_RequestType = void 0;
|
|
495
|
+
(function (Enum_RequestType) {
|
|
496
|
+
Enum_RequestType[Enum_RequestType["TXINPUT"] = 0] = "TXINPUT";
|
|
497
|
+
Enum_RequestType[Enum_RequestType["TXOUTPUT"] = 1] = "TXOUTPUT";
|
|
498
|
+
Enum_RequestType[Enum_RequestType["TXMETA"] = 2] = "TXMETA";
|
|
499
|
+
Enum_RequestType[Enum_RequestType["TXFINISHED"] = 3] = "TXFINISHED";
|
|
500
|
+
Enum_RequestType[Enum_RequestType["TXEXTRADATA"] = 4] = "TXEXTRADATA";
|
|
501
|
+
Enum_RequestType[Enum_RequestType["TXORIGINPUT"] = 5] = "TXORIGINPUT";
|
|
502
|
+
Enum_RequestType[Enum_RequestType["TXORIGOUTPUT"] = 6] = "TXORIGOUTPUT";
|
|
503
|
+
})(exports.Enum_RequestType || (exports.Enum_RequestType = {}));
|
|
504
|
+
exports.RebootType = void 0;
|
|
505
|
+
(function (RebootType) {
|
|
506
|
+
RebootType[RebootType["Normal"] = 0] = "Normal";
|
|
507
|
+
RebootType[RebootType["Boardloader"] = 1] = "Boardloader";
|
|
508
|
+
RebootType[RebootType["BootLoader"] = 2] = "BootLoader";
|
|
509
|
+
})(exports.RebootType || (exports.RebootType = {}));
|
|
510
|
+
exports.CardanoDerivationType = void 0;
|
|
511
|
+
(function (CardanoDerivationType) {
|
|
512
|
+
CardanoDerivationType[CardanoDerivationType["LEDGER"] = 0] = "LEDGER";
|
|
513
|
+
CardanoDerivationType[CardanoDerivationType["ICARUS"] = 1] = "ICARUS";
|
|
514
|
+
CardanoDerivationType[CardanoDerivationType["ICARUS_TREZOR"] = 2] = "ICARUS_TREZOR";
|
|
515
|
+
})(exports.CardanoDerivationType || (exports.CardanoDerivationType = {}));
|
|
516
|
+
exports.CardanoAddressType = void 0;
|
|
517
|
+
(function (CardanoAddressType) {
|
|
518
|
+
CardanoAddressType[CardanoAddressType["BASE"] = 0] = "BASE";
|
|
519
|
+
CardanoAddressType[CardanoAddressType["BASE_SCRIPT_KEY"] = 1] = "BASE_SCRIPT_KEY";
|
|
520
|
+
CardanoAddressType[CardanoAddressType["BASE_KEY_SCRIPT"] = 2] = "BASE_KEY_SCRIPT";
|
|
521
|
+
CardanoAddressType[CardanoAddressType["BASE_SCRIPT_SCRIPT"] = 3] = "BASE_SCRIPT_SCRIPT";
|
|
522
|
+
CardanoAddressType[CardanoAddressType["POINTER"] = 4] = "POINTER";
|
|
523
|
+
CardanoAddressType[CardanoAddressType["POINTER_SCRIPT"] = 5] = "POINTER_SCRIPT";
|
|
524
|
+
CardanoAddressType[CardanoAddressType["ENTERPRISE"] = 6] = "ENTERPRISE";
|
|
525
|
+
CardanoAddressType[CardanoAddressType["ENTERPRISE_SCRIPT"] = 7] = "ENTERPRISE_SCRIPT";
|
|
526
|
+
CardanoAddressType[CardanoAddressType["BYRON"] = 8] = "BYRON";
|
|
527
|
+
CardanoAddressType[CardanoAddressType["REWARD"] = 14] = "REWARD";
|
|
528
|
+
CardanoAddressType[CardanoAddressType["REWARD_SCRIPT"] = 15] = "REWARD_SCRIPT";
|
|
529
|
+
})(exports.CardanoAddressType || (exports.CardanoAddressType = {}));
|
|
530
|
+
exports.CardanoNativeScriptType = void 0;
|
|
531
|
+
(function (CardanoNativeScriptType) {
|
|
532
|
+
CardanoNativeScriptType[CardanoNativeScriptType["PUB_KEY"] = 0] = "PUB_KEY";
|
|
533
|
+
CardanoNativeScriptType[CardanoNativeScriptType["ALL"] = 1] = "ALL";
|
|
534
|
+
CardanoNativeScriptType[CardanoNativeScriptType["ANY"] = 2] = "ANY";
|
|
535
|
+
CardanoNativeScriptType[CardanoNativeScriptType["N_OF_K"] = 3] = "N_OF_K";
|
|
536
|
+
CardanoNativeScriptType[CardanoNativeScriptType["INVALID_BEFORE"] = 4] = "INVALID_BEFORE";
|
|
537
|
+
CardanoNativeScriptType[CardanoNativeScriptType["INVALID_HEREAFTER"] = 5] = "INVALID_HEREAFTER";
|
|
538
|
+
})(exports.CardanoNativeScriptType || (exports.CardanoNativeScriptType = {}));
|
|
539
|
+
exports.CardanoNativeScriptHashDisplayFormat = void 0;
|
|
540
|
+
(function (CardanoNativeScriptHashDisplayFormat) {
|
|
541
|
+
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["HIDE"] = 0] = "HIDE";
|
|
542
|
+
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["BECH32"] = 1] = "BECH32";
|
|
543
|
+
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["POLICY_ID"] = 2] = "POLICY_ID";
|
|
544
|
+
})(exports.CardanoNativeScriptHashDisplayFormat || (exports.CardanoNativeScriptHashDisplayFormat = {}));
|
|
545
|
+
exports.CardanoTxOutputSerializationFormat = void 0;
|
|
546
|
+
(function (CardanoTxOutputSerializationFormat) {
|
|
547
|
+
CardanoTxOutputSerializationFormat[CardanoTxOutputSerializationFormat["ARRAY_LEGACY"] = 0] = "ARRAY_LEGACY";
|
|
548
|
+
CardanoTxOutputSerializationFormat[CardanoTxOutputSerializationFormat["MAP_BABBAGE"] = 1] = "MAP_BABBAGE";
|
|
549
|
+
})(exports.CardanoTxOutputSerializationFormat || (exports.CardanoTxOutputSerializationFormat = {}));
|
|
550
|
+
exports.CardanoCertificateType = void 0;
|
|
551
|
+
(function (CardanoCertificateType) {
|
|
552
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_REGISTRATION"] = 0] = "STAKE_REGISTRATION";
|
|
553
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_DEREGISTRATION"] = 1] = "STAKE_DEREGISTRATION";
|
|
554
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_DELEGATION"] = 2] = "STAKE_DELEGATION";
|
|
555
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_POOL_REGISTRATION"] = 3] = "STAKE_POOL_REGISTRATION";
|
|
556
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_REGISTRATION_CONWAY"] = 7] = "STAKE_REGISTRATION_CONWAY";
|
|
557
|
+
CardanoCertificateType[CardanoCertificateType["STAKE_DEREGISTRATION_CONWAY"] = 8] = "STAKE_DEREGISTRATION_CONWAY";
|
|
558
|
+
CardanoCertificateType[CardanoCertificateType["VOTE_DELEGATION"] = 9] = "VOTE_DELEGATION";
|
|
559
|
+
})(exports.CardanoCertificateType || (exports.CardanoCertificateType = {}));
|
|
560
|
+
exports.CardanoDRepType = void 0;
|
|
561
|
+
(function (CardanoDRepType) {
|
|
562
|
+
CardanoDRepType[CardanoDRepType["KEY_HASH"] = 0] = "KEY_HASH";
|
|
563
|
+
CardanoDRepType[CardanoDRepType["SCRIPT_HASH"] = 1] = "SCRIPT_HASH";
|
|
564
|
+
CardanoDRepType[CardanoDRepType["ABSTAIN"] = 2] = "ABSTAIN";
|
|
565
|
+
CardanoDRepType[CardanoDRepType["NO_CONFIDENCE"] = 3] = "NO_CONFIDENCE";
|
|
566
|
+
})(exports.CardanoDRepType || (exports.CardanoDRepType = {}));
|
|
567
|
+
exports.CardanoPoolRelayType = void 0;
|
|
568
|
+
(function (CardanoPoolRelayType) {
|
|
569
|
+
CardanoPoolRelayType[CardanoPoolRelayType["SINGLE_HOST_IP"] = 0] = "SINGLE_HOST_IP";
|
|
570
|
+
CardanoPoolRelayType[CardanoPoolRelayType["SINGLE_HOST_NAME"] = 1] = "SINGLE_HOST_NAME";
|
|
571
|
+
CardanoPoolRelayType[CardanoPoolRelayType["MULTIPLE_HOST_NAME"] = 2] = "MULTIPLE_HOST_NAME";
|
|
572
|
+
})(exports.CardanoPoolRelayType || (exports.CardanoPoolRelayType = {}));
|
|
573
|
+
exports.CardanoTxAuxiliaryDataSupplementType = void 0;
|
|
574
|
+
(function (CardanoTxAuxiliaryDataSupplementType) {
|
|
575
|
+
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["NONE"] = 0] = "NONE";
|
|
576
|
+
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["CVOTE_REGISTRATION_SIGNATURE"] = 1] = "CVOTE_REGISTRATION_SIGNATURE";
|
|
577
|
+
})(exports.CardanoTxAuxiliaryDataSupplementType || (exports.CardanoTxAuxiliaryDataSupplementType = {}));
|
|
578
|
+
exports.CardanoCVoteRegistrationFormat = void 0;
|
|
579
|
+
(function (CardanoCVoteRegistrationFormat) {
|
|
580
|
+
CardanoCVoteRegistrationFormat[CardanoCVoteRegistrationFormat["CIP15"] = 0] = "CIP15";
|
|
581
|
+
CardanoCVoteRegistrationFormat[CardanoCVoteRegistrationFormat["CIP36"] = 1] = "CIP36";
|
|
582
|
+
})(exports.CardanoCVoteRegistrationFormat || (exports.CardanoCVoteRegistrationFormat = {}));
|
|
583
|
+
exports.CardanoTxSigningMode = void 0;
|
|
584
|
+
(function (CardanoTxSigningMode) {
|
|
585
|
+
CardanoTxSigningMode[CardanoTxSigningMode["ORDINARY_TRANSACTION"] = 0] = "ORDINARY_TRANSACTION";
|
|
586
|
+
CardanoTxSigningMode[CardanoTxSigningMode["POOL_REGISTRATION_AS_OWNER"] = 1] = "POOL_REGISTRATION_AS_OWNER";
|
|
587
|
+
CardanoTxSigningMode[CardanoTxSigningMode["MULTISIG_TRANSACTION"] = 2] = "MULTISIG_TRANSACTION";
|
|
588
|
+
CardanoTxSigningMode[CardanoTxSigningMode["PLUTUS_TRANSACTION"] = 3] = "PLUTUS_TRANSACTION";
|
|
589
|
+
})(exports.CardanoTxSigningMode || (exports.CardanoTxSigningMode = {}));
|
|
590
|
+
exports.CardanoTxWitnessType = void 0;
|
|
591
|
+
(function (CardanoTxWitnessType) {
|
|
592
|
+
CardanoTxWitnessType[CardanoTxWitnessType["BYRON_WITNESS"] = 0] = "BYRON_WITNESS";
|
|
593
|
+
CardanoTxWitnessType[CardanoTxWitnessType["SHELLEY_WITNESS"] = 1] = "SHELLEY_WITNESS";
|
|
594
|
+
})(exports.CardanoTxWitnessType || (exports.CardanoTxWitnessType = {}));
|
|
595
|
+
exports.FailureType = void 0;
|
|
596
|
+
(function (FailureType) {
|
|
597
|
+
FailureType[FailureType["Failure_UnexpectedMessage"] = 1] = "Failure_UnexpectedMessage";
|
|
598
|
+
FailureType[FailureType["Failure_ButtonExpected"] = 2] = "Failure_ButtonExpected";
|
|
599
|
+
FailureType[FailureType["Failure_DataError"] = 3] = "Failure_DataError";
|
|
600
|
+
FailureType[FailureType["Failure_ActionCancelled"] = 4] = "Failure_ActionCancelled";
|
|
601
|
+
FailureType[FailureType["Failure_PinExpected"] = 5] = "Failure_PinExpected";
|
|
602
|
+
FailureType[FailureType["Failure_PinCancelled"] = 6] = "Failure_PinCancelled";
|
|
603
|
+
FailureType[FailureType["Failure_PinInvalid"] = 7] = "Failure_PinInvalid";
|
|
604
|
+
FailureType[FailureType["Failure_InvalidSignature"] = 8] = "Failure_InvalidSignature";
|
|
605
|
+
FailureType[FailureType["Failure_ProcessError"] = 9] = "Failure_ProcessError";
|
|
606
|
+
FailureType[FailureType["Failure_NotEnoughFunds"] = 10] = "Failure_NotEnoughFunds";
|
|
607
|
+
FailureType[FailureType["Failure_NotInitialized"] = 11] = "Failure_NotInitialized";
|
|
608
|
+
FailureType[FailureType["Failure_PinMismatch"] = 12] = "Failure_PinMismatch";
|
|
609
|
+
FailureType[FailureType["Failure_WipeCodeMismatch"] = 13] = "Failure_WipeCodeMismatch";
|
|
610
|
+
FailureType[FailureType["Failure_InvalidSession"] = 14] = "Failure_InvalidSession";
|
|
611
|
+
FailureType[FailureType["Failure_FirmwareError"] = 99] = "Failure_FirmwareError";
|
|
612
|
+
})(exports.FailureType || (exports.FailureType = {}));
|
|
613
|
+
exports.Enum_ButtonRequestType = void 0;
|
|
614
|
+
(function (Enum_ButtonRequestType) {
|
|
615
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Other"] = 1] = "ButtonRequest_Other";
|
|
616
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_FeeOverThreshold"] = 2] = "ButtonRequest_FeeOverThreshold";
|
|
617
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ConfirmOutput"] = 3] = "ButtonRequest_ConfirmOutput";
|
|
618
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ResetDevice"] = 4] = "ButtonRequest_ResetDevice";
|
|
619
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ConfirmWord"] = 5] = "ButtonRequest_ConfirmWord";
|
|
620
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_WipeDevice"] = 6] = "ButtonRequest_WipeDevice";
|
|
621
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_ProtectCall"] = 7] = "ButtonRequest_ProtectCall";
|
|
622
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_SignTx"] = 8] = "ButtonRequest_SignTx";
|
|
623
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_FirmwareCheck"] = 9] = "ButtonRequest_FirmwareCheck";
|
|
624
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Address"] = 10] = "ButtonRequest_Address";
|
|
625
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PublicKey"] = 11] = "ButtonRequest_PublicKey";
|
|
626
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_MnemonicWordCount"] = 12] = "ButtonRequest_MnemonicWordCount";
|
|
627
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_MnemonicInput"] = 13] = "ButtonRequest_MnemonicInput";
|
|
628
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["_Deprecated_ButtonRequest_PassphraseType"] = 14] = "_Deprecated_ButtonRequest_PassphraseType";
|
|
629
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_UnknownDerivationPath"] = 15] = "ButtonRequest_UnknownDerivationPath";
|
|
630
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_RecoveryHomepage"] = 16] = "ButtonRequest_RecoveryHomepage";
|
|
631
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Success"] = 17] = "ButtonRequest_Success";
|
|
632
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Warning"] = 18] = "ButtonRequest_Warning";
|
|
633
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PassphraseEntry"] = 19] = "ButtonRequest_PassphraseEntry";
|
|
634
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PinEntry"] = 20] = "ButtonRequest_PinEntry";
|
|
635
|
+
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_AttachPin"] = 8000] = "ButtonRequest_AttachPin";
|
|
636
|
+
})(exports.Enum_ButtonRequestType || (exports.Enum_ButtonRequestType = {}));
|
|
637
|
+
exports.Enum_PinMatrixRequestType = void 0;
|
|
638
|
+
(function (Enum_PinMatrixRequestType) {
|
|
639
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_Current"] = 1] = "PinMatrixRequestType_Current";
|
|
640
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_NewFirst"] = 2] = "PinMatrixRequestType_NewFirst";
|
|
641
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_NewSecond"] = 3] = "PinMatrixRequestType_NewSecond";
|
|
642
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_WipeCodeFirst"] = 4] = "PinMatrixRequestType_WipeCodeFirst";
|
|
643
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_WipeCodeSecond"] = 5] = "PinMatrixRequestType_WipeCodeSecond";
|
|
644
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_BackupFirst"] = 6] = "PinMatrixRequestType_BackupFirst";
|
|
645
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_BackupSecond"] = 7] = "PinMatrixRequestType_BackupSecond";
|
|
646
|
+
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_AttachToPin"] = 8000] = "PinMatrixRequestType_AttachToPin";
|
|
647
|
+
})(exports.Enum_PinMatrixRequestType || (exports.Enum_PinMatrixRequestType = {}));
|
|
648
|
+
exports.EthereumDefinitionType = void 0;
|
|
649
|
+
(function (EthereumDefinitionType) {
|
|
650
|
+
EthereumDefinitionType[EthereumDefinitionType["NETWORK"] = 0] = "NETWORK";
|
|
651
|
+
EthereumDefinitionType[EthereumDefinitionType["TOKEN"] = 1] = "TOKEN";
|
|
652
|
+
})(exports.EthereumDefinitionType || (exports.EthereumDefinitionType = {}));
|
|
653
|
+
exports.EthereumGnosisSafeTxOperation = void 0;
|
|
654
|
+
(function (EthereumGnosisSafeTxOperation) {
|
|
655
|
+
EthereumGnosisSafeTxOperation[EthereumGnosisSafeTxOperation["CALL"] = 0] = "CALL";
|
|
656
|
+
EthereumGnosisSafeTxOperation[EthereumGnosisSafeTxOperation["DELEGATE_CALL"] = 1] = "DELEGATE_CALL";
|
|
657
|
+
})(exports.EthereumGnosisSafeTxOperation || (exports.EthereumGnosisSafeTxOperation = {}));
|
|
658
|
+
exports.EthereumDataTypeUKey = void 0;
|
|
659
|
+
(function (EthereumDataTypeUKey) {
|
|
660
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["UINT"] = 1] = "UINT";
|
|
661
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["INT"] = 2] = "INT";
|
|
662
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["BYTES"] = 3] = "BYTES";
|
|
663
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["STRING"] = 4] = "STRING";
|
|
664
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["BOOL"] = 5] = "BOOL";
|
|
665
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["ADDRESS"] = 6] = "ADDRESS";
|
|
666
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["ARRAY"] = 7] = "ARRAY";
|
|
667
|
+
EthereumDataTypeUKey[EthereumDataTypeUKey["STRUCT"] = 8] = "STRUCT";
|
|
668
|
+
})(exports.EthereumDataTypeUKey || (exports.EthereumDataTypeUKey = {}));
|
|
669
|
+
exports.EthereumDataType = void 0;
|
|
670
|
+
(function (EthereumDataType) {
|
|
671
|
+
EthereumDataType[EthereumDataType["UINT"] = 1] = "UINT";
|
|
672
|
+
EthereumDataType[EthereumDataType["INT"] = 2] = "INT";
|
|
673
|
+
EthereumDataType[EthereumDataType["BYTES"] = 3] = "BYTES";
|
|
674
|
+
EthereumDataType[EthereumDataType["STRING"] = 4] = "STRING";
|
|
675
|
+
EthereumDataType[EthereumDataType["BOOL"] = 5] = "BOOL";
|
|
676
|
+
EthereumDataType[EthereumDataType["ADDRESS"] = 6] = "ADDRESS";
|
|
677
|
+
EthereumDataType[EthereumDataType["ARRAY"] = 7] = "ARRAY";
|
|
678
|
+
EthereumDataType[EthereumDataType["STRUCT"] = 8] = "STRUCT";
|
|
679
|
+
})(exports.EthereumDataType || (exports.EthereumDataType = {}));
|
|
680
|
+
exports.Enum_BackupType = void 0;
|
|
681
|
+
(function (Enum_BackupType) {
|
|
682
|
+
Enum_BackupType[Enum_BackupType["Bip39"] = 0] = "Bip39";
|
|
683
|
+
Enum_BackupType[Enum_BackupType["Slip39_Basic"] = 1] = "Slip39_Basic";
|
|
684
|
+
Enum_BackupType[Enum_BackupType["Slip39_Advanced"] = 2] = "Slip39_Advanced";
|
|
685
|
+
})(exports.Enum_BackupType || (exports.Enum_BackupType = {}));
|
|
686
|
+
exports.Enum_SafetyCheckLevel = void 0;
|
|
687
|
+
(function (Enum_SafetyCheckLevel) {
|
|
688
|
+
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["Strict"] = 0] = "Strict";
|
|
689
|
+
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["PromptAlways"] = 1] = "PromptAlways";
|
|
690
|
+
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["PromptTemporarily"] = 2] = "PromptTemporarily";
|
|
691
|
+
})(exports.Enum_SafetyCheckLevel || (exports.Enum_SafetyCheckLevel = {}));
|
|
692
|
+
exports.UKeyDeviceType = void 0;
|
|
693
|
+
(function (UKeyDeviceType) {
|
|
694
|
+
UKeyDeviceType[UKeyDeviceType["CLASSIC"] = 0] = "CLASSIC";
|
|
695
|
+
UKeyDeviceType[UKeyDeviceType["CLASSIC1S"] = 1] = "CLASSIC1S";
|
|
696
|
+
UKeyDeviceType[UKeyDeviceType["MINI"] = 2] = "MINI";
|
|
697
|
+
UKeyDeviceType[UKeyDeviceType["TOUCH"] = 3] = "TOUCH";
|
|
698
|
+
UKeyDeviceType[UKeyDeviceType["PRO"] = 5] = "PRO";
|
|
699
|
+
UKeyDeviceType[UKeyDeviceType["PURE"] = 6] = "PURE";
|
|
700
|
+
})(exports.UKeyDeviceType || (exports.UKeyDeviceType = {}));
|
|
701
|
+
exports.UKeySeType = void 0;
|
|
702
|
+
(function (UKeySeType) {
|
|
703
|
+
UKeySeType[UKeySeType["THD89"] = 0] = "THD89";
|
|
704
|
+
UKeySeType[UKeySeType["SE608A"] = 1] = "SE608A";
|
|
705
|
+
})(exports.UKeySeType || (exports.UKeySeType = {}));
|
|
706
|
+
exports.UKeySEState = void 0;
|
|
707
|
+
(function (UKeySEState) {
|
|
708
|
+
UKeySEState[UKeySEState["BOOT"] = 0] = "BOOT";
|
|
709
|
+
UKeySEState[UKeySEState["APP"] = 1] = "APP";
|
|
710
|
+
})(exports.UKeySEState || (exports.UKeySEState = {}));
|
|
711
|
+
exports.Enum_Capability = void 0;
|
|
712
|
+
(function (Enum_Capability) {
|
|
713
|
+
Enum_Capability[Enum_Capability["Capability_Bitcoin"] = 1] = "Capability_Bitcoin";
|
|
714
|
+
Enum_Capability[Enum_Capability["Capability_Bitcoin_like"] = 2] = "Capability_Bitcoin_like";
|
|
715
|
+
Enum_Capability[Enum_Capability["Capability_Binance"] = 3] = "Capability_Binance";
|
|
716
|
+
Enum_Capability[Enum_Capability["Capability_Cardano"] = 4] = "Capability_Cardano";
|
|
717
|
+
Enum_Capability[Enum_Capability["Capability_Crypto"] = 5] = "Capability_Crypto";
|
|
718
|
+
Enum_Capability[Enum_Capability["Capability_EOS"] = 6] = "Capability_EOS";
|
|
719
|
+
Enum_Capability[Enum_Capability["Capability_Ethereum"] = 7] = "Capability_Ethereum";
|
|
720
|
+
Enum_Capability[Enum_Capability["Capability_Lisk"] = 8] = "Capability_Lisk";
|
|
721
|
+
Enum_Capability[Enum_Capability["Capability_Monero"] = 9] = "Capability_Monero";
|
|
722
|
+
Enum_Capability[Enum_Capability["Capability_NEM"] = 10] = "Capability_NEM";
|
|
723
|
+
Enum_Capability[Enum_Capability["Capability_Ripple"] = 11] = "Capability_Ripple";
|
|
724
|
+
Enum_Capability[Enum_Capability["Capability_Stellar"] = 12] = "Capability_Stellar";
|
|
725
|
+
Enum_Capability[Enum_Capability["Capability_Tezos"] = 13] = "Capability_Tezos";
|
|
726
|
+
Enum_Capability[Enum_Capability["Capability_U2F"] = 14] = "Capability_U2F";
|
|
727
|
+
Enum_Capability[Enum_Capability["Capability_Shamir"] = 15] = "Capability_Shamir";
|
|
728
|
+
Enum_Capability[Enum_Capability["Capability_ShamirGroups"] = 16] = "Capability_ShamirGroups";
|
|
729
|
+
Enum_Capability[Enum_Capability["Capability_PassphraseEntry"] = 17] = "Capability_PassphraseEntry";
|
|
730
|
+
Enum_Capability[Enum_Capability["Capability_EthereumTypedData"] = 1000] = "Capability_EthereumTypedData";
|
|
731
|
+
Enum_Capability[Enum_Capability["Capability_AttachToPin"] = 8000] = "Capability_AttachToPin";
|
|
732
|
+
})(exports.Enum_Capability || (exports.Enum_Capability = {}));
|
|
733
|
+
exports.ExportType = void 0;
|
|
734
|
+
(function (ExportType) {
|
|
735
|
+
ExportType[ExportType["SeedEncExportType_NO"] = 0] = "SeedEncExportType_NO";
|
|
736
|
+
ExportType[ExportType["SeedEncExportType_YES"] = 1] = "SeedEncExportType_YES";
|
|
737
|
+
ExportType[ExportType["MnemonicPlainExportType_YES"] = 2] = "MnemonicPlainExportType_YES";
|
|
738
|
+
})(exports.ExportType || (exports.ExportType = {}));
|
|
739
|
+
exports.SdProtectOperationType = void 0;
|
|
740
|
+
(function (SdProtectOperationType) {
|
|
741
|
+
SdProtectOperationType[SdProtectOperationType["DISABLE"] = 0] = "DISABLE";
|
|
742
|
+
SdProtectOperationType[SdProtectOperationType["ENABLE"] = 1] = "ENABLE";
|
|
743
|
+
SdProtectOperationType[SdProtectOperationType["REFRESH"] = 2] = "REFRESH";
|
|
744
|
+
})(exports.SdProtectOperationType || (exports.SdProtectOperationType = {}));
|
|
745
|
+
exports.RecoveryDeviceType = void 0;
|
|
746
|
+
(function (RecoveryDeviceType) {
|
|
747
|
+
RecoveryDeviceType[RecoveryDeviceType["RecoveryDeviceType_ScrambledWords"] = 0] = "RecoveryDeviceType_ScrambledWords";
|
|
748
|
+
RecoveryDeviceType[RecoveryDeviceType["RecoveryDeviceType_Matrix"] = 1] = "RecoveryDeviceType_Matrix";
|
|
749
|
+
})(exports.RecoveryDeviceType || (exports.RecoveryDeviceType = {}));
|
|
750
|
+
exports.Enum_WordRequestType = void 0;
|
|
751
|
+
(function (Enum_WordRequestType) {
|
|
752
|
+
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Plain"] = 0] = "WordRequestType_Plain";
|
|
753
|
+
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Matrix9"] = 1] = "WordRequestType_Matrix9";
|
|
754
|
+
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Matrix6"] = 2] = "WordRequestType_Matrix6";
|
|
755
|
+
})(exports.Enum_WordRequestType || (exports.Enum_WordRequestType = {}));
|
|
756
|
+
exports.SeedRequestType = void 0;
|
|
757
|
+
(function (SeedRequestType) {
|
|
758
|
+
SeedRequestType[SeedRequestType["SeedRequestType_Gen"] = 0] = "SeedRequestType_Gen";
|
|
759
|
+
SeedRequestType[SeedRequestType["SeedRequestType_EncExport"] = 1] = "SeedRequestType_EncExport";
|
|
760
|
+
SeedRequestType[SeedRequestType["SeedRequestType_EncImport"] = 2] = "SeedRequestType_EncImport";
|
|
761
|
+
})(exports.SeedRequestType || (exports.SeedRequestType = {}));
|
|
762
|
+
exports.WL_OperationType = void 0;
|
|
763
|
+
(function (WL_OperationType) {
|
|
764
|
+
WL_OperationType[WL_OperationType["WL_OperationType_Add"] = 0] = "WL_OperationType_Add";
|
|
765
|
+
WL_OperationType[WL_OperationType["WL_OperationType_Delete"] = 1] = "WL_OperationType_Delete";
|
|
766
|
+
WL_OperationType[WL_OperationType["WL_OperationType_Inquire"] = 2] = "WL_OperationType_Inquire";
|
|
767
|
+
})(exports.WL_OperationType || (exports.WL_OperationType = {}));
|
|
768
|
+
exports.ResourceType = void 0;
|
|
769
|
+
(function (ResourceType) {
|
|
770
|
+
ResourceType[ResourceType["WallPaper"] = 0] = "WallPaper";
|
|
771
|
+
ResourceType[ResourceType["Nft"] = 1] = "Nft";
|
|
772
|
+
})(exports.ResourceType || (exports.ResourceType = {}));
|
|
773
|
+
exports.NEMMosaicLevy = void 0;
|
|
774
|
+
(function (NEMMosaicLevy) {
|
|
775
|
+
NEMMosaicLevy[NEMMosaicLevy["MosaicLevy_Absolute"] = 1] = "MosaicLevy_Absolute";
|
|
776
|
+
NEMMosaicLevy[NEMMosaicLevy["MosaicLevy_Percentile"] = 2] = "MosaicLevy_Percentile";
|
|
777
|
+
})(exports.NEMMosaicLevy || (exports.NEMMosaicLevy = {}));
|
|
778
|
+
exports.NEMSupplyChangeType = void 0;
|
|
779
|
+
(function (NEMSupplyChangeType) {
|
|
780
|
+
NEMSupplyChangeType[NEMSupplyChangeType["SupplyChange_Increase"] = 1] = "SupplyChange_Increase";
|
|
781
|
+
NEMSupplyChangeType[NEMSupplyChangeType["SupplyChange_Decrease"] = 2] = "SupplyChange_Decrease";
|
|
782
|
+
})(exports.NEMSupplyChangeType || (exports.NEMSupplyChangeType = {}));
|
|
783
|
+
exports.NEMModificationType = void 0;
|
|
784
|
+
(function (NEMModificationType) {
|
|
785
|
+
NEMModificationType[NEMModificationType["CosignatoryModification_Add"] = 1] = "CosignatoryModification_Add";
|
|
786
|
+
NEMModificationType[NEMModificationType["CosignatoryModification_Delete"] = 2] = "CosignatoryModification_Delete";
|
|
787
|
+
})(exports.NEMModificationType || (exports.NEMModificationType = {}));
|
|
788
|
+
exports.NEMImportanceTransferMode = void 0;
|
|
789
|
+
(function (NEMImportanceTransferMode) {
|
|
790
|
+
NEMImportanceTransferMode[NEMImportanceTransferMode["ImportanceTransfer_Activate"] = 1] = "ImportanceTransfer_Activate";
|
|
791
|
+
NEMImportanceTransferMode[NEMImportanceTransferMode["ImportanceTransfer_Deactivate"] = 2] = "ImportanceTransfer_Deactivate";
|
|
792
|
+
})(exports.NEMImportanceTransferMode || (exports.NEMImportanceTransferMode = {}));
|
|
793
|
+
exports.SolanaOffChainMessageVersion = void 0;
|
|
794
|
+
(function (SolanaOffChainMessageVersion) {
|
|
795
|
+
SolanaOffChainMessageVersion[SolanaOffChainMessageVersion["MESSAGE_VERSION_0"] = 0] = "MESSAGE_VERSION_0";
|
|
796
|
+
})(exports.SolanaOffChainMessageVersion || (exports.SolanaOffChainMessageVersion = {}));
|
|
797
|
+
exports.SolanaOffChainMessageFormat = void 0;
|
|
798
|
+
(function (SolanaOffChainMessageFormat) {
|
|
799
|
+
SolanaOffChainMessageFormat[SolanaOffChainMessageFormat["V0_RESTRICTED_ASCII"] = 0] = "V0_RESTRICTED_ASCII";
|
|
800
|
+
SolanaOffChainMessageFormat[SolanaOffChainMessageFormat["V0_LIMITED_UTF8"] = 1] = "V0_LIMITED_UTF8";
|
|
801
|
+
})(exports.SolanaOffChainMessageFormat || (exports.SolanaOffChainMessageFormat = {}));
|
|
802
|
+
exports.StellarAssetType = void 0;
|
|
803
|
+
(function (StellarAssetType) {
|
|
804
|
+
StellarAssetType[StellarAssetType["NATIVE"] = 0] = "NATIVE";
|
|
805
|
+
StellarAssetType[StellarAssetType["ALPHANUM4"] = 1] = "ALPHANUM4";
|
|
806
|
+
StellarAssetType[StellarAssetType["ALPHANUM12"] = 2] = "ALPHANUM12";
|
|
807
|
+
})(exports.StellarAssetType || (exports.StellarAssetType = {}));
|
|
808
|
+
exports.StellarMemoType = void 0;
|
|
809
|
+
(function (StellarMemoType) {
|
|
810
|
+
StellarMemoType[StellarMemoType["NONE"] = 0] = "NONE";
|
|
811
|
+
StellarMemoType[StellarMemoType["TEXT"] = 1] = "TEXT";
|
|
812
|
+
StellarMemoType[StellarMemoType["ID"] = 2] = "ID";
|
|
813
|
+
StellarMemoType[StellarMemoType["HASH"] = 3] = "HASH";
|
|
814
|
+
StellarMemoType[StellarMemoType["RETURN"] = 4] = "RETURN";
|
|
815
|
+
})(exports.StellarMemoType || (exports.StellarMemoType = {}));
|
|
816
|
+
exports.StellarSignerType = void 0;
|
|
817
|
+
(function (StellarSignerType) {
|
|
818
|
+
StellarSignerType[StellarSignerType["ACCOUNT"] = 0] = "ACCOUNT";
|
|
819
|
+
StellarSignerType[StellarSignerType["PRE_AUTH"] = 1] = "PRE_AUTH";
|
|
820
|
+
StellarSignerType[StellarSignerType["HASH"] = 2] = "HASH";
|
|
821
|
+
})(exports.StellarSignerType || (exports.StellarSignerType = {}));
|
|
822
|
+
exports.TezosContractType = void 0;
|
|
823
|
+
(function (TezosContractType) {
|
|
824
|
+
TezosContractType[TezosContractType["Implicit"] = 0] = "Implicit";
|
|
825
|
+
TezosContractType[TezosContractType["Originated"] = 1] = "Originated";
|
|
826
|
+
})(exports.TezosContractType || (exports.TezosContractType = {}));
|
|
827
|
+
exports.TezosBallotType = void 0;
|
|
828
|
+
(function (TezosBallotType) {
|
|
829
|
+
TezosBallotType[TezosBallotType["Yay"] = 0] = "Yay";
|
|
830
|
+
TezosBallotType[TezosBallotType["Nay"] = 1] = "Nay";
|
|
831
|
+
TezosBallotType[TezosBallotType["Pass"] = 2] = "Pass";
|
|
832
|
+
})(exports.TezosBallotType || (exports.TezosBallotType = {}));
|
|
833
|
+
exports.TonWalletVersion = void 0;
|
|
834
|
+
(function (TonWalletVersion) {
|
|
835
|
+
TonWalletVersion[TonWalletVersion["V4R2"] = 3] = "V4R2";
|
|
836
|
+
})(exports.TonWalletVersion || (exports.TonWalletVersion = {}));
|
|
837
|
+
exports.TonWorkChain = void 0;
|
|
838
|
+
(function (TonWorkChain) {
|
|
839
|
+
TonWorkChain[TonWorkChain["BASECHAIN"] = 0] = "BASECHAIN";
|
|
840
|
+
TonWorkChain[TonWorkChain["MASTERCHAIN"] = 1] = "MASTERCHAIN";
|
|
841
|
+
})(exports.TonWorkChain || (exports.TonWorkChain = {}));
|
|
842
|
+
exports.TronResourceCode = void 0;
|
|
843
|
+
(function (TronResourceCode) {
|
|
844
|
+
TronResourceCode[TronResourceCode["BANDWIDTH"] = 0] = "BANDWIDTH";
|
|
845
|
+
TronResourceCode[TronResourceCode["ENERGY"] = 1] = "ENERGY";
|
|
846
|
+
TronResourceCode[TronResourceCode["TRON_POWER"] = 2] = "TRON_POWER";
|
|
847
|
+
})(exports.TronResourceCode || (exports.TronResourceCode = {}));
|
|
848
|
+
exports.TronMessageType = void 0;
|
|
849
|
+
(function (TronMessageType) {
|
|
850
|
+
TronMessageType[TronMessageType["V1"] = 1] = "V1";
|
|
851
|
+
TronMessageType[TronMessageType["V2"] = 2] = "V2";
|
|
852
|
+
})(exports.TronMessageType || (exports.TronMessageType = {}));
|
|
853
|
+
exports.CommandFlags = void 0;
|
|
854
|
+
(function (CommandFlags) {
|
|
855
|
+
CommandFlags[CommandFlags["Default"] = 0] = "Default";
|
|
856
|
+
CommandFlags[CommandFlags["Factory_Only"] = 1] = "Factory_Only";
|
|
857
|
+
})(exports.CommandFlags || (exports.CommandFlags = {}));
|
|
858
|
+
|
|
859
|
+
var messages = /*#__PURE__*/Object.freeze({
|
|
860
|
+
__proto__: null,
|
|
861
|
+
get AptosTransactionType () { return exports.AptosTransactionType; },
|
|
862
|
+
get BinanceOrderType () { return exports.BinanceOrderType; },
|
|
863
|
+
get BinanceOrderSide () { return exports.BinanceOrderSide; },
|
|
864
|
+
get BinanceTimeInForce () { return exports.BinanceTimeInForce; },
|
|
865
|
+
get Enum_InputScriptType () { return exports.Enum_InputScriptType; },
|
|
866
|
+
get Enum_OutputScriptType () { return exports.Enum_OutputScriptType; },
|
|
867
|
+
get DecredStakingSpendType () { return exports.DecredStakingSpendType; },
|
|
868
|
+
get AmountUnit () { return exports.AmountUnit; },
|
|
869
|
+
get Enum_RequestType () { return exports.Enum_RequestType; },
|
|
870
|
+
get RebootType () { return exports.RebootType; },
|
|
871
|
+
get CardanoDerivationType () { return exports.CardanoDerivationType; },
|
|
872
|
+
get CardanoAddressType () { return exports.CardanoAddressType; },
|
|
873
|
+
get CardanoNativeScriptType () { return exports.CardanoNativeScriptType; },
|
|
874
|
+
get CardanoNativeScriptHashDisplayFormat () { return exports.CardanoNativeScriptHashDisplayFormat; },
|
|
875
|
+
get CardanoTxOutputSerializationFormat () { return exports.CardanoTxOutputSerializationFormat; },
|
|
876
|
+
get CardanoCertificateType () { return exports.CardanoCertificateType; },
|
|
877
|
+
get CardanoDRepType () { return exports.CardanoDRepType; },
|
|
878
|
+
get CardanoPoolRelayType () { return exports.CardanoPoolRelayType; },
|
|
879
|
+
get CardanoTxAuxiliaryDataSupplementType () { return exports.CardanoTxAuxiliaryDataSupplementType; },
|
|
880
|
+
get CardanoCVoteRegistrationFormat () { return exports.CardanoCVoteRegistrationFormat; },
|
|
881
|
+
get CardanoTxSigningMode () { return exports.CardanoTxSigningMode; },
|
|
882
|
+
get CardanoTxWitnessType () { return exports.CardanoTxWitnessType; },
|
|
883
|
+
get FailureType () { return exports.FailureType; },
|
|
884
|
+
get Enum_ButtonRequestType () { return exports.Enum_ButtonRequestType; },
|
|
885
|
+
get Enum_PinMatrixRequestType () { return exports.Enum_PinMatrixRequestType; },
|
|
886
|
+
get EthereumDefinitionType () { return exports.EthereumDefinitionType; },
|
|
887
|
+
get EthereumGnosisSafeTxOperation () { return exports.EthereumGnosisSafeTxOperation; },
|
|
888
|
+
get EthereumDataTypeUKey () { return exports.EthereumDataTypeUKey; },
|
|
889
|
+
get EthereumDataType () { return exports.EthereumDataType; },
|
|
890
|
+
get Enum_BackupType () { return exports.Enum_BackupType; },
|
|
891
|
+
get Enum_SafetyCheckLevel () { return exports.Enum_SafetyCheckLevel; },
|
|
892
|
+
get UKeyDeviceType () { return exports.UKeyDeviceType; },
|
|
893
|
+
get UKeySeType () { return exports.UKeySeType; },
|
|
894
|
+
get UKeySEState () { return exports.UKeySEState; },
|
|
895
|
+
get Enum_Capability () { return exports.Enum_Capability; },
|
|
896
|
+
get ExportType () { return exports.ExportType; },
|
|
897
|
+
get SdProtectOperationType () { return exports.SdProtectOperationType; },
|
|
898
|
+
get RecoveryDeviceType () { return exports.RecoveryDeviceType; },
|
|
899
|
+
get Enum_WordRequestType () { return exports.Enum_WordRequestType; },
|
|
900
|
+
get SeedRequestType () { return exports.SeedRequestType; },
|
|
901
|
+
get WL_OperationType () { return exports.WL_OperationType; },
|
|
902
|
+
get ResourceType () { return exports.ResourceType; },
|
|
903
|
+
get NEMMosaicLevy () { return exports.NEMMosaicLevy; },
|
|
904
|
+
get NEMSupplyChangeType () { return exports.NEMSupplyChangeType; },
|
|
905
|
+
get NEMModificationType () { return exports.NEMModificationType; },
|
|
906
|
+
get NEMImportanceTransferMode () { return exports.NEMImportanceTransferMode; },
|
|
907
|
+
get SolanaOffChainMessageVersion () { return exports.SolanaOffChainMessageVersion; },
|
|
908
|
+
get SolanaOffChainMessageFormat () { return exports.SolanaOffChainMessageFormat; },
|
|
909
|
+
get StellarAssetType () { return exports.StellarAssetType; },
|
|
910
|
+
get StellarMemoType () { return exports.StellarMemoType; },
|
|
911
|
+
get StellarSignerType () { return exports.StellarSignerType; },
|
|
912
|
+
get TezosContractType () { return exports.TezosContractType; },
|
|
913
|
+
get TezosBallotType () { return exports.TezosBallotType; },
|
|
914
|
+
get TonWalletVersion () { return exports.TonWalletVersion; },
|
|
915
|
+
get TonWorkChain () { return exports.TonWorkChain; },
|
|
916
|
+
get TronResourceCode () { return exports.TronResourceCode; },
|
|
917
|
+
get TronMessageType () { return exports.TronMessageType; },
|
|
918
|
+
get CommandFlags () { return exports.CommandFlags; }
|
|
919
|
+
});
|
|
920
|
+
|
|
921
|
+
const LogBlockCommand = new Set(['PassphraseAck', 'PinMatrixAck']);
|
|
922
|
+
|
|
923
|
+
protobuf__namespace.util.Long = Long__namespace;
|
|
924
|
+
protobuf__namespace.configure();
|
|
925
|
+
var index = {
|
|
926
|
+
check,
|
|
927
|
+
buildOne,
|
|
928
|
+
buildBuffers,
|
|
929
|
+
buildEncodeBuffers,
|
|
930
|
+
receiveOne,
|
|
931
|
+
parseConfigure,
|
|
932
|
+
decodeProtocol,
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
exports.BUFFER_SIZE = BUFFER_SIZE;
|
|
936
|
+
exports.COMMON_HEADER_SIZE = COMMON_HEADER_SIZE;
|
|
937
|
+
exports.HEADER_SIZE = HEADER_SIZE;
|
|
938
|
+
exports.LogBlockCommand = LogBlockCommand;
|
|
939
|
+
exports.MESSAGE_HEADER_BYTE = MESSAGE_HEADER_BYTE;
|
|
940
|
+
exports.MESSAGE_TOP_CHAR = MESSAGE_TOP_CHAR;
|
|
941
|
+
exports.Messages = messages;
|
|
942
|
+
exports["default"] = index;
|