@initia/initia.js 0.2.20 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -31
- package/dist/TransportWebHID-BJGOHoD4.js +1 -0
- package/dist/TransportWebHID-BpNQALzF.mjs +154 -0
- package/dist/TransportWebUSB-Bog8kAV9.js +1 -0
- package/dist/TransportWebUSB-Bs9AHNsu.mjs +196 -0
- package/dist/client/index.d.ts +0 -1
- package/dist/client/rest/APIRequester.d.ts +1 -0
- package/dist/client/rest/Wallet.d.ts +1 -0
- package/dist/client/rest/api/AuthzAPI.d.ts +1 -1
- package/dist/client/rest/api/EvmAPI.d.ts +4 -4
- package/dist/client/rest/api/ForwardingAPI.d.ts +2 -1
- package/dist/client/rest/api/GovAPI.d.ts +4 -4
- package/dist/client/rest/api/GroupAPI.d.ts +7 -7
- package/dist/client/rest/api/IbcAPI.d.ts +2 -2
- package/dist/client/rest/api/IbcNftAPI.d.ts +1 -1
- package/dist/client/rest/api/IbcPermAPI.d.ts +1 -1
- package/dist/client/rest/api/IbcTransferAPI.d.ts +1 -11
- package/dist/client/rest/api/MoveAPI.d.ts +12 -20
- package/dist/client/rest/api/MstakingAPI.d.ts +1 -1
- package/dist/client/rest/api/OpchildAPI.d.ts +1 -1
- package/dist/client/rest/api/OphostAPI.d.ts +10 -10
- package/dist/client/rest/api/SlashingAPI.d.ts +4 -22
- package/dist/client/rest/api/TxAPI.d.ts +3 -3
- package/dist/client/rest/api/WasmAPI.d.ts +4 -4
- package/dist/core/Duration.d.ts +1 -2
- package/dist/core/auth/BaseAccount.d.ts +2 -2
- package/dist/core/bank/msgs/MsgMultiSend.d.ts +8 -8
- package/dist/core/crisis/msgs/MsgVerifyInvariant.d.ts +7 -7
- package/dist/core/gov/Vote.d.ts +2 -2
- package/dist/core/ibc/applications/transfer/index.d.ts +1 -0
- package/dist/core/ibc/core/client/index.d.ts +1 -0
- package/dist/core/ibc/core/client/msgs/tendermint/crypto.d.ts +2 -2
- package/dist/core/ibc/core/client/msgs/tendermint/types.d.ts +27 -28
- package/dist/core/ibc/lightclient/tendermint/Header.d.ts +5 -5
- package/dist/core/move/Module.d.ts +36 -0
- package/dist/core/move/index.d.ts +1 -0
- package/dist/core/move/msgs/MsgExecute.d.ts +2 -2
- package/dist/core/move/msgs/MsgPublish.d.ts +2 -2
- package/dist/core/move/msgs/MsgScript.d.ts +2 -2
- package/dist/core/mstaking/Redelegation.d.ts +3 -3
- package/dist/core/mstaking/UnbondingDelegation.d.ts +3 -3
- package/dist/core/mstaking/Validator.d.ts +9 -9
- package/dist/core/mstaking/msgs/MsgDelegate.d.ts +2 -2
- package/dist/core/mstaking/msgs/MsgEditValidator.d.ts +2 -2
- package/dist/core/mstaking/msgs/MsgUndelegate.d.ts +2 -2
- package/dist/core/slashing/SlashingParams.d.ts +4 -4
- package/dist/core/slashing/ValidatorSigningInfo.d.ts +37 -0
- package/dist/core/slashing/index.d.ts +1 -0
- package/dist/core/tx/SignatureV2.d.ts +1 -1
- package/dist/index-BNBWMUWc.mjs +456 -0
- package/dist/index-BY4R60_E.js +2 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +11293 -9146
- package/dist/key/RawKey.d.ts +1 -1
- package/dist/util/bcs.d.ts +10 -10
- package/package.json +14 -18
- package/dist/TransportWebHID-BwOWyIog.mjs +0 -313
- package/dist/TransportWebHID-CVJmgfzo.js +0 -1
- package/dist/TransportWebUSB-BjylRdFj.mjs +0 -413
- package/dist/TransportWebUSB-V4VV5RPc.js +0 -1
- package/dist/client/LocalInitia.d.ts +0 -18
- package/dist/index-CGO7OOZz.js +0 -2
- package/dist/index-LYdmc_QU.mjs +0 -449
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
import T from "@ledgerhq/hw-transport";
|
|
2
|
-
import { b as E, i as D, e as S, l as _, c as B, D as N, f as U, T as L, d as M } from "./index-LYdmc_QU.mjs";
|
|
3
|
-
var g = function(a, c, e, i) {
|
|
4
|
-
function r(n) {
|
|
5
|
-
return n instanceof e ? n : new e(function(s) {
|
|
6
|
-
s(n);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
return new (e || (e = Promise))(function(n, s) {
|
|
10
|
-
function f(u) {
|
|
11
|
-
try {
|
|
12
|
-
t(i.next(u));
|
|
13
|
-
} catch (l) {
|
|
14
|
-
s(l);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function o(u) {
|
|
18
|
-
try {
|
|
19
|
-
t(i.throw(u));
|
|
20
|
-
} catch (l) {
|
|
21
|
-
s(l);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function t(u) {
|
|
25
|
-
u.done ? n(u.value) : r(u.value).then(f, o);
|
|
26
|
-
}
|
|
27
|
-
t((i = i.apply(a, c || [])).next());
|
|
28
|
-
});
|
|
29
|
-
}, p = function(a, c) {
|
|
30
|
-
var e = { label: 0, sent: function() {
|
|
31
|
-
if (n[0] & 1) throw n[1];
|
|
32
|
-
return n[1];
|
|
33
|
-
}, trys: [], ops: [] }, i, r, n, s;
|
|
34
|
-
return s = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
35
|
-
return this;
|
|
36
|
-
}), s;
|
|
37
|
-
function f(t) {
|
|
38
|
-
return function(u) {
|
|
39
|
-
return o([t, u]);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function o(t) {
|
|
43
|
-
if (i) throw new TypeError("Generator is already executing.");
|
|
44
|
-
for (; e; ) try {
|
|
45
|
-
if (i = 1, r && (n = t[0] & 2 ? r.return : t[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, t[1])).done) return n;
|
|
46
|
-
switch (r = 0, n && (t = [t[0] & 2, n.value]), t[0]) {
|
|
47
|
-
case 0:
|
|
48
|
-
case 1:
|
|
49
|
-
n = t;
|
|
50
|
-
break;
|
|
51
|
-
case 4:
|
|
52
|
-
return e.label++, { value: t[1], done: !1 };
|
|
53
|
-
case 5:
|
|
54
|
-
e.label++, r = t[1], t = [0];
|
|
55
|
-
continue;
|
|
56
|
-
case 7:
|
|
57
|
-
t = e.ops.pop(), e.trys.pop();
|
|
58
|
-
continue;
|
|
59
|
-
default:
|
|
60
|
-
if (n = e.trys, !(n = n.length > 0 && n[n.length - 1]) && (t[0] === 6 || t[0] === 2)) {
|
|
61
|
-
e = 0;
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
if (t[0] === 3 && (!n || t[1] > n[0] && t[1] < n[3])) {
|
|
65
|
-
e.label = t[1];
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
if (t[0] === 6 && e.label < n[1]) {
|
|
69
|
-
e.label = n[1], n = t;
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
if (n && e.label < n[2]) {
|
|
73
|
-
e.label = n[2], e.ops.push(t);
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
n[2] && e.ops.pop(), e.trys.pop();
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
t = c.call(a, e);
|
|
80
|
-
} catch (u) {
|
|
81
|
-
t = [6, u], r = 0;
|
|
82
|
-
} finally {
|
|
83
|
-
i = n = 0;
|
|
84
|
-
}
|
|
85
|
-
if (t[0] & 5) throw t[1];
|
|
86
|
-
return { value: t[0] ? t[1] : void 0, done: !0 };
|
|
87
|
-
}
|
|
88
|
-
}, C = [
|
|
89
|
-
{
|
|
90
|
-
vendorId: E
|
|
91
|
-
}
|
|
92
|
-
];
|
|
93
|
-
function O() {
|
|
94
|
-
return g(this, void 0, void 0, function() {
|
|
95
|
-
var a;
|
|
96
|
-
return p(this, function(c) {
|
|
97
|
-
switch (c.label) {
|
|
98
|
-
case 0:
|
|
99
|
-
return [4, navigator.usb.requestDevice({
|
|
100
|
-
filters: C
|
|
101
|
-
})];
|
|
102
|
-
case 1:
|
|
103
|
-
return a = c.sent(), [2, a];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
function y() {
|
|
109
|
-
return g(this, void 0, void 0, function() {
|
|
110
|
-
var a;
|
|
111
|
-
return p(this, function(c) {
|
|
112
|
-
switch (c.label) {
|
|
113
|
-
case 0:
|
|
114
|
-
return [4, navigator.usb.getDevices()];
|
|
115
|
-
case 1:
|
|
116
|
-
return a = c.sent(), [2, a.filter(function(e) {
|
|
117
|
-
return e.vendorId === E;
|
|
118
|
-
})];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function R() {
|
|
124
|
-
return g(this, void 0, void 0, function() {
|
|
125
|
-
var a;
|
|
126
|
-
return p(this, function(c) {
|
|
127
|
-
switch (c.label) {
|
|
128
|
-
case 0:
|
|
129
|
-
return [4, y()];
|
|
130
|
-
case 1:
|
|
131
|
-
return a = c.sent(), a.length > 0 ? [2, a[0]] : [2, O()];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
var q = function() {
|
|
137
|
-
return Promise.resolve(!!navigator && !!navigator.usb && typeof navigator.usb.getDevices == "function");
|
|
138
|
-
}, W = /* @__PURE__ */ function() {
|
|
139
|
-
var a = function(c, e) {
|
|
140
|
-
return a = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
141
|
-
i.__proto__ = r;
|
|
142
|
-
} || function(i, r) {
|
|
143
|
-
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (i[n] = r[n]);
|
|
144
|
-
}, a(c, e);
|
|
145
|
-
};
|
|
146
|
-
return function(c, e) {
|
|
147
|
-
if (typeof e != "function" && e !== null)
|
|
148
|
-
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
|
149
|
-
a(c, e);
|
|
150
|
-
function i() {
|
|
151
|
-
this.constructor = c;
|
|
152
|
-
}
|
|
153
|
-
c.prototype = e === null ? Object.create(e) : (i.prototype = e.prototype, new i());
|
|
154
|
-
};
|
|
155
|
-
}(), d = function(a, c, e, i) {
|
|
156
|
-
function r(n) {
|
|
157
|
-
return n instanceof e ? n : new e(function(s) {
|
|
158
|
-
s(n);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
return new (e || (e = Promise))(function(n, s) {
|
|
162
|
-
function f(u) {
|
|
163
|
-
try {
|
|
164
|
-
t(i.next(u));
|
|
165
|
-
} catch (l) {
|
|
166
|
-
s(l);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function o(u) {
|
|
170
|
-
try {
|
|
171
|
-
t(i.throw(u));
|
|
172
|
-
} catch (l) {
|
|
173
|
-
s(l);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
function t(u) {
|
|
177
|
-
u.done ? n(u.value) : r(u.value).then(f, o);
|
|
178
|
-
}
|
|
179
|
-
t((i = i.apply(a, c || [])).next());
|
|
180
|
-
});
|
|
181
|
-
}, h = function(a, c) {
|
|
182
|
-
var e = { label: 0, sent: function() {
|
|
183
|
-
if (n[0] & 1) throw n[1];
|
|
184
|
-
return n[1];
|
|
185
|
-
}, trys: [], ops: [] }, i, r, n, s;
|
|
186
|
-
return s = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
187
|
-
return this;
|
|
188
|
-
}), s;
|
|
189
|
-
function f(t) {
|
|
190
|
-
return function(u) {
|
|
191
|
-
return o([t, u]);
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
function o(t) {
|
|
195
|
-
if (i) throw new TypeError("Generator is already executing.");
|
|
196
|
-
for (; e; ) try {
|
|
197
|
-
if (i = 1, r && (n = t[0] & 2 ? r.return : t[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, t[1])).done) return n;
|
|
198
|
-
switch (r = 0, n && (t = [t[0] & 2, n.value]), t[0]) {
|
|
199
|
-
case 0:
|
|
200
|
-
case 1:
|
|
201
|
-
n = t;
|
|
202
|
-
break;
|
|
203
|
-
case 4:
|
|
204
|
-
return e.label++, { value: t[1], done: !1 };
|
|
205
|
-
case 5:
|
|
206
|
-
e.label++, r = t[1], t = [0];
|
|
207
|
-
continue;
|
|
208
|
-
case 7:
|
|
209
|
-
t = e.ops.pop(), e.trys.pop();
|
|
210
|
-
continue;
|
|
211
|
-
default:
|
|
212
|
-
if (n = e.trys, !(n = n.length > 0 && n[n.length - 1]) && (t[0] === 6 || t[0] === 2)) {
|
|
213
|
-
e = 0;
|
|
214
|
-
continue;
|
|
215
|
-
}
|
|
216
|
-
if (t[0] === 3 && (!n || t[1] > n[0] && t[1] < n[3])) {
|
|
217
|
-
e.label = t[1];
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
220
|
-
if (t[0] === 6 && e.label < n[1]) {
|
|
221
|
-
e.label = n[1], n = t;
|
|
222
|
-
break;
|
|
223
|
-
}
|
|
224
|
-
if (n && e.label < n[2]) {
|
|
225
|
-
e.label = n[2], e.ops.push(t);
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
n[2] && e.ops.pop(), e.trys.pop();
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
t = c.call(a, e);
|
|
232
|
-
} catch (u) {
|
|
233
|
-
t = [6, u], r = 0;
|
|
234
|
-
} finally {
|
|
235
|
-
i = n = 0;
|
|
236
|
-
}
|
|
237
|
-
if (t[0] & 5) throw t[1];
|
|
238
|
-
return { value: t[0] ? t[1] : void 0, done: !0 };
|
|
239
|
-
}
|
|
240
|
-
}, j = 1, k = 3, G = (
|
|
241
|
-
/** @class */
|
|
242
|
-
function(a) {
|
|
243
|
-
W(c, a);
|
|
244
|
-
function c(e, i) {
|
|
245
|
-
var r = a.call(this) || this;
|
|
246
|
-
return r.channel = Math.floor(Math.random() * 65535), r.packetSize = 64, r._disconnectEmitted = !1, r._emitDisconnect = function(n) {
|
|
247
|
-
r._disconnectEmitted || (r._disconnectEmitted = !0, r.emit("disconnect", n));
|
|
248
|
-
}, r.device = e, r.interfaceNumber = i, r.deviceModel = D(e.productId), r;
|
|
249
|
-
}
|
|
250
|
-
return c.request = function() {
|
|
251
|
-
return d(this, void 0, void 0, function() {
|
|
252
|
-
var e;
|
|
253
|
-
return h(this, function(i) {
|
|
254
|
-
switch (i.label) {
|
|
255
|
-
case 0:
|
|
256
|
-
return [4, O()];
|
|
257
|
-
case 1:
|
|
258
|
-
return e = i.sent(), [2, c.open(e)];
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
}, c.openConnected = function() {
|
|
263
|
-
return d(this, void 0, void 0, function() {
|
|
264
|
-
var e;
|
|
265
|
-
return h(this, function(i) {
|
|
266
|
-
switch (i.label) {
|
|
267
|
-
case 0:
|
|
268
|
-
return [4, y()];
|
|
269
|
-
case 1:
|
|
270
|
-
return e = i.sent(), e.length === 0 ? [2, null] : [2, c.open(e[0])];
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
});
|
|
274
|
-
}, c.open = function(e) {
|
|
275
|
-
return d(this, void 0, void 0, function() {
|
|
276
|
-
var i, r, n, s, f;
|
|
277
|
-
return h(this, function(o) {
|
|
278
|
-
switch (o.label) {
|
|
279
|
-
case 0:
|
|
280
|
-
return [4, e.open()];
|
|
281
|
-
case 1:
|
|
282
|
-
return o.sent(), e.configuration !== null ? [3, 3] : [4, e.selectConfiguration(j)];
|
|
283
|
-
case 2:
|
|
284
|
-
o.sent(), o.label = 3;
|
|
285
|
-
case 3:
|
|
286
|
-
return [4, I(e)];
|
|
287
|
-
case 4:
|
|
288
|
-
if (o.sent(), i = e.configurations[0].interfaces.find(function(t) {
|
|
289
|
-
var u = t.alternates;
|
|
290
|
-
return u.some(function(l) {
|
|
291
|
-
return l.interfaceClass === 255;
|
|
292
|
-
});
|
|
293
|
-
}), !i)
|
|
294
|
-
throw new S("No WebUSB interface found for your Ledger device. Please upgrade firmware or contact techsupport.");
|
|
295
|
-
r = i.interfaceNumber, o.label = 5;
|
|
296
|
-
case 5:
|
|
297
|
-
return o.trys.push([5, 7, , 9]), [4, e.claimInterface(r)];
|
|
298
|
-
case 6:
|
|
299
|
-
return o.sent(), [3, 9];
|
|
300
|
-
case 7:
|
|
301
|
-
return n = o.sent(), [4, e.close()];
|
|
302
|
-
case 8:
|
|
303
|
-
throw o.sent(), new S(n.message);
|
|
304
|
-
case 9:
|
|
305
|
-
return s = new c(e, r), f = function(t) {
|
|
306
|
-
e === t.device && (navigator.usb.removeEventListener("disconnect", f), s._emitDisconnect(new M()));
|
|
307
|
-
}, navigator.usb.addEventListener("disconnect", f), [2, s];
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
}, c.prototype.close = function() {
|
|
312
|
-
return d(this, void 0, void 0, function() {
|
|
313
|
-
return h(this, function(e) {
|
|
314
|
-
switch (e.label) {
|
|
315
|
-
case 0:
|
|
316
|
-
return [4, this.exchangeBusyPromise];
|
|
317
|
-
case 1:
|
|
318
|
-
return e.sent(), [4, this.device.releaseInterface(this.interfaceNumber)];
|
|
319
|
-
case 2:
|
|
320
|
-
return e.sent(), [4, I(this.device)];
|
|
321
|
-
case 3:
|
|
322
|
-
return e.sent(), [4, this.device.close()];
|
|
323
|
-
case 4:
|
|
324
|
-
return e.sent(), [
|
|
325
|
-
2
|
|
326
|
-
/*return*/
|
|
327
|
-
];
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
}, c.prototype.exchange = function(e) {
|
|
332
|
-
return d(this, void 0, void 0, function() {
|
|
333
|
-
var i, r = this;
|
|
334
|
-
return h(this, function(n) {
|
|
335
|
-
switch (n.label) {
|
|
336
|
-
case 0:
|
|
337
|
-
return [4, this.exchangeAtomicImpl(function() {
|
|
338
|
-
return d(r, void 0, void 0, function() {
|
|
339
|
-
var s, f, o, t, u, l, b, w, m, x;
|
|
340
|
-
return h(this, function(v) {
|
|
341
|
-
switch (v.label) {
|
|
342
|
-
case 0:
|
|
343
|
-
s = this, f = s.channel, o = s.packetSize, _("apdu", "=> " + e.toString("hex")), t = B(f, o), u = t.makeBlocks(e), l = 0, v.label = 1;
|
|
344
|
-
case 1:
|
|
345
|
-
return l < u.length ? [4, this.device.transferOut(k, u[l])] : [3, 4];
|
|
346
|
-
case 2:
|
|
347
|
-
v.sent(), v.label = 3;
|
|
348
|
-
case 3:
|
|
349
|
-
return l++, [3, 1];
|
|
350
|
-
case 4:
|
|
351
|
-
return (b = t.getReducedResult(w)) ? [3, 6] : [4, this.device.transferIn(k, o)];
|
|
352
|
-
case 5:
|
|
353
|
-
return m = v.sent(), x = Buffer.from(m.data.buffer), w = t.reduceResponse(w, x), [3, 4];
|
|
354
|
-
case 6:
|
|
355
|
-
return _("apdu", "<= " + b.toString("hex")), [2, b];
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
});
|
|
359
|
-
}).catch(function(s) {
|
|
360
|
-
throw s && s.message && s.message.includes("disconnected") ? (r._emitDisconnect(s), new N(s.message)) : s;
|
|
361
|
-
})];
|
|
362
|
-
case 1:
|
|
363
|
-
return i = n.sent(), [2, i];
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
}, c.prototype.setScrambleKey = function() {
|
|
368
|
-
}, c.isSupported = q, c.list = y, c.listen = function(e) {
|
|
369
|
-
var i = !1;
|
|
370
|
-
R().then(function(n) {
|
|
371
|
-
if (!i) {
|
|
372
|
-
var s = D(n.productId);
|
|
373
|
-
e.next({
|
|
374
|
-
type: "add",
|
|
375
|
-
descriptor: n,
|
|
376
|
-
deviceModel: s
|
|
377
|
-
}), e.complete();
|
|
378
|
-
}
|
|
379
|
-
}, function(n) {
|
|
380
|
-
window.DOMException && n instanceof window.DOMException && n.code === 18 ? e.error(new U(n.message)) : e.error(new L(n.message));
|
|
381
|
-
});
|
|
382
|
-
function r() {
|
|
383
|
-
i = !0;
|
|
384
|
-
}
|
|
385
|
-
return {
|
|
386
|
-
unsubscribe: r
|
|
387
|
-
};
|
|
388
|
-
}, c;
|
|
389
|
-
}(T)
|
|
390
|
-
);
|
|
391
|
-
function I(a) {
|
|
392
|
-
return d(this, void 0, void 0, function() {
|
|
393
|
-
var c;
|
|
394
|
-
return h(this, function(e) {
|
|
395
|
-
switch (e.label) {
|
|
396
|
-
case 0:
|
|
397
|
-
return e.trys.push([0, 2, , 3]), [4, a.reset()];
|
|
398
|
-
case 1:
|
|
399
|
-
return e.sent(), [3, 3];
|
|
400
|
-
case 2:
|
|
401
|
-
return c = e.sent(), console.warn(c), [3, 3];
|
|
402
|
-
case 3:
|
|
403
|
-
return [
|
|
404
|
-
2
|
|
405
|
-
/*return*/
|
|
406
|
-
];
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
export {
|
|
412
|
-
G as default
|
|
413
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("@ledgerhq/hw-transport"),d=require("./index-CGO7OOZz.js");var p=function(o,c,e,i){function r(n){return n instanceof e?n:new e(function(u){u(n)})}return new(e||(e=Promise))(function(n,u){function f(s){try{t(i.next(s))}catch(l){u(l)}}function a(s){try{t(i.throw(s))}catch(l){u(l)}}function t(s){s.done?n(s.value):r(s.value).then(f,a)}t((i=i.apply(o,c||[])).next())})},m=function(o,c){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,r,n,u;return u={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(t){return function(s){return a([t,s])}}function a(t){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,r&&(n=t[0]&2?r.return:t[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,t[1])).done)return n;switch(r=0,n&&(t=[t[0]&2,n.value]),t[0]){case 0:case 1:n=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,r=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(n=e.trys,!(n=n.length>0&&n[n.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!n||t[1]>n[0]&&t[1]<n[3])){e.label=t[1];break}if(t[0]===6&&e.label<n[1]){e.label=n[1],n=t;break}if(n&&e.label<n[2]){e.label=n[2],e.ops.push(t);break}n[2]&&e.ops.pop(),e.trys.pop();continue}t=c.call(o,e)}catch(s){t=[6,s],r=0}finally{i=n=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},B=[{vendorId:d.ledgerUSBVendorId}];function I(){return p(this,void 0,void 0,function(){var o;return m(this,function(c){switch(c.label){case 0:return[4,navigator.usb.requestDevice({filters:B})];case 1:return o=c.sent(),[2,o]}})})}function y(){return p(this,void 0,void 0,function(){var o;return m(this,function(c){switch(c.label){case 0:return[4,navigator.usb.getDevices()];case 1:return o=c.sent(),[2,o.filter(function(e){return e.vendorId===d.ledgerUSBVendorId})]}})})}function O(){return p(this,void 0,void 0,function(){var o;return m(this,function(c){switch(c.label){case 0:return[4,y()];case 1:return o=c.sent(),o.length>0?[2,o[0]]:[2,I()]}})})}var T=function(){return Promise.resolve(!!navigator&&!!navigator.usb&&typeof navigator.usb.getDevices=="function")},E=function(){var o=function(c,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[n]=r[n])},o(c,e)};return function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(c,e);function i(){this.constructor=c}c.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),h=function(o,c,e,i){function r(n){return n instanceof e?n:new e(function(u){u(n)})}return new(e||(e=Promise))(function(n,u){function f(s){try{t(i.next(s))}catch(l){u(l)}}function a(s){try{t(i.throw(s))}catch(l){u(l)}}function t(s){s.done?n(s.value):r(s.value).then(f,a)}t((i=i.apply(o,c||[])).next())})},v=function(o,c){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,r,n,u;return u={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(t){return function(s){return a([t,s])}}function a(t){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,r&&(n=t[0]&2?r.return:t[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,t[1])).done)return n;switch(r=0,n&&(t=[t[0]&2,n.value]),t[0]){case 0:case 1:n=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,r=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(n=e.trys,!(n=n.length>0&&n[n.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!n||t[1]>n[0]&&t[1]<n[3])){e.label=t[1];break}if(t[0]===6&&e.label<n[1]){e.label=n[1],n=t;break}if(n&&e.label<n[2]){e.label=n[2],e.ops.push(t);break}n[2]&&e.ops.pop(),e.trys.pop();continue}t=c.call(o,e)}catch(s){t=[6,s],r=0}finally{i=n=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},U=1,D=3,N=function(o){E(c,o);function c(e,i){var r=o.call(this)||this;return r.channel=Math.floor(Math.random()*65535),r.packetSize=64,r._disconnectEmitted=!1,r._emitDisconnect=function(n){r._disconnectEmitted||(r._disconnectEmitted=!0,r.emit("disconnect",n))},r.device=e,r.interfaceNumber=i,r.deviceModel=d.identifyUSBProductId(e.productId),r}return c.request=function(){return h(this,void 0,void 0,function(){var e;return v(this,function(i){switch(i.label){case 0:return[4,I()];case 1:return e=i.sent(),[2,c.open(e)]}})})},c.openConnected=function(){return h(this,void 0,void 0,function(){var e;return v(this,function(i){switch(i.label){case 0:return[4,y()];case 1:return e=i.sent(),e.length===0?[2,null]:[2,c.open(e[0])]}})})},c.open=function(e){return h(this,void 0,void 0,function(){var i,r,n,u,f;return v(this,function(a){switch(a.label){case 0:return[4,e.open()];case 1:return a.sent(),e.configuration!==null?[3,3]:[4,e.selectConfiguration(U)];case 2:a.sent(),a.label=3;case 3:return[4,_(e)];case 4:if(a.sent(),i=e.configurations[0].interfaces.find(function(t){var s=t.alternates;return s.some(function(l){return l.interfaceClass===255})}),!i)throw new d.TransportInterfaceNotAvailable("No WebUSB interface found for your Ledger device. Please upgrade firmware or contact techsupport.");r=i.interfaceNumber,a.label=5;case 5:return a.trys.push([5,7,,9]),[4,e.claimInterface(r)];case 6:return a.sent(),[3,9];case 7:return n=a.sent(),[4,e.close()];case 8:throw a.sent(),new d.TransportInterfaceNotAvailable(n.message);case 9:return u=new c(e,r),f=function(t){e===t.device&&(navigator.usb.removeEventListener("disconnect",f),u._emitDisconnect(new d.DisconnectedDevice))},navigator.usb.addEventListener("disconnect",f),[2,u]}})})},c.prototype.close=function(){return h(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:return[4,this.exchangeBusyPromise];case 1:return e.sent(),[4,this.device.releaseInterface(this.interfaceNumber)];case 2:return e.sent(),[4,_(this.device)];case 3:return e.sent(),[4,this.device.close()];case 4:return e.sent(),[2]}})})},c.prototype.exchange=function(e){return h(this,void 0,void 0,function(){var i,r=this;return v(this,function(n){switch(n.label){case 0:return[4,this.exchangeAtomicImpl(function(){return h(r,void 0,void 0,function(){var u,f,a,t,s,l,w,g,x,S;return v(this,function(b){switch(b.label){case 0:u=this,f=u.channel,a=u.packetSize,d.log("apdu","=> "+e.toString("hex")),t=d.createHIDframing(f,a),s=t.makeBlocks(e),l=0,b.label=1;case 1:return l<s.length?[4,this.device.transferOut(D,s[l])]:[3,4];case 2:b.sent(),b.label=3;case 3:return l++,[3,1];case 4:return(w=t.getReducedResult(g))?[3,6]:[4,this.device.transferIn(D,a)];case 5:return x=b.sent(),S=Buffer.from(x.data.buffer),g=t.reduceResponse(g,S),[3,4];case 6:return d.log("apdu","<= "+w.toString("hex")),[2,w]}})})}).catch(function(u){throw u&&u.message&&u.message.includes("disconnected")?(r._emitDisconnect(u),new d.DisconnectedDeviceDuringOperation(u.message)):u})];case 1:return i=n.sent(),[2,i]}})})},c.prototype.setScrambleKey=function(){},c.isSupported=T,c.list=y,c.listen=function(e){var i=!1;O().then(function(n){if(!i){var u=d.identifyUSBProductId(n.productId);e.next({type:"add",descriptor:n,deviceModel:u}),e.complete()}},function(n){window.DOMException&&n instanceof window.DOMException&&n.code===18?e.error(new d.TransportWebUSBGestureRequired(n.message)):e.error(new d.TransportOpenUserCancelled(n.message))});function r(){i=!0}return{unsubscribe:r}},c}(k);function _(o){return h(this,void 0,void 0,function(){var c;return v(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,o.reset()];case 1:return e.sent(),[3,3];case 2:return c=e.sent(),console.warn(c),[3,3];case 3:return[2]}})})}exports.default=N;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { RESTClient } from './rest/RESTClient';
|
|
2
|
-
import { Wallet } from './rest/Wallet';
|
|
3
|
-
export declare class LocalInitia extends RESTClient {
|
|
4
|
-
wallets: {
|
|
5
|
-
validator: Wallet;
|
|
6
|
-
test1: Wallet;
|
|
7
|
-
test2: Wallet;
|
|
8
|
-
test3: Wallet;
|
|
9
|
-
test4: Wallet;
|
|
10
|
-
test5: Wallet;
|
|
11
|
-
test6: Wallet;
|
|
12
|
-
test7: Wallet;
|
|
13
|
-
test8: Wallet;
|
|
14
|
-
test9: Wallet;
|
|
15
|
-
test10: Wallet;
|
|
16
|
-
};
|
|
17
|
-
constructor();
|
|
18
|
-
}
|
package/dist/index-CGO7OOZz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const N=require("semver");var y=function(){var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},r(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),R={},A=function(r,t){R[r]=t},e=function(r){var t=function(n){y(o,n);function o(a,i,u){var c=n.call(this,a||r,u)||this;if(Object.setPrototypeOf(c,o.prototype),c.name=r,i)for(var d in i)c[d]=i[d];if(u&&L(u)&&"cause"in u&&!("cause"in c)){var v=u.cause;c.cause=v,"stack"in v&&(c.stack=c.stack+`
|
|
2
|
-
CAUSE: `+v.stack)}return c}return o}(Error);return t};function L(r){return typeof r=="object"}var C=function(){var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},r(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}();e("AccountNameRequired");e("AccountNotSupported");e("AmountRequired");e("BluetoothRequired");e("BtcUnmatchedApp");e("CantOpenDevice");e("CashAddrNotSupported");e("CurrencyNotSupported");e("DeviceAppVerifyNotSupported");e("DeviceGenuineSocketEarlyClose");e("DeviceNotGenuine");e("DeviceOnDashboardExpected");e("DeviceOnDashboardUnexpected");e("DeviceInOSUExpected");e("DeviceHalted");e("DeviceNameInvalid");e("DeviceSocketFail");e("DeviceSocketNoBulkStatus");var B=e("LockedDeviceError"),P=e("DisconnectedDevice"),w=e("DisconnectedDeviceDuringOperation");e("DeviceExtractOnboardingStateError");e("DeviceOnboardingStatePollingError");e("EnpointConfig");e("EthAppPleaseEnableContractData");e("FeeEstimationFailed");e("FirmwareNotRecognized");e("HardResetFail");e("InvalidXRPTag");e("InvalidAddress");e("InvalidAddressBecauseDestinationIsAlsoSource");e("LatestMCUInstalledError");e("UnknownMCU");e("LedgerAPIError");e("LedgerAPIErrorWithMessage");e("LedgerAPINotAvailable");e("ManagerAppAlreadyInstalled");e("ManagerAppRelyOnBTC");e("ManagerAppDepInstallRequired");e("ManagerAppDepUninstallRequired");e("ManagerDeviceLocked");e("ManagerFirmwareNotEnoughSpace");e("ManagerNotEnoughSpace");e("ManagerUninstallBTCDep");e("NetworkDown");e("NoAddressesFound");e("NotEnoughBalance");e("NotEnoughBalanceToDelegate");e("NotEnoughBalanceInParentAccount");e("NotEnoughSpendableBalance");e("NotEnoughBalanceBecauseDestinationNotCreated");e("NoAccessToCamera");e("NotEnoughGas");e("NotSupportedLegacyAddress");e("GasLessThanEstimate");e("PriorityFeeTooLow");e("PriorityFeeTooHigh");e("PriorityFeeHigherThanMaxFee");e("MaxFeeTooLow");e("PasswordsDontMatch");e("PasswordIncorrect");e("RecommendSubAccountsToEmpty");e("RecommendUndelegation");e("TimeoutTagged");e("UnexpectedBootloader");e("MCUNotGenuineToDashboard");e("RecipientRequired");e("UnavailableTezosOriginatedAccountReceive");e("UnavailableTezosOriginatedAccountSend");e("UpdateFetchFileFail");e("UpdateIncorrectHash");e("UpdateIncorrectSig");e("UpdateYourApp");e("UserRefusedDeviceNameChange");e("UserRefusedAddress");e("UserRefusedFirmwareUpdate");e("UserRefusedAllowManager");e("UserRefusedOnDevice");var b=e("TransportOpenUserCancelled"),M=e("TransportInterfaceNotAvailable");e("TransportRaceCondition");var F=e("TransportWebUSBGestureRequired");e("DeviceShouldStayInApp");e("WebsocketConnectionError");e("WebsocketConnectionFailed");e("WrongDeviceForAccount");e("WrongAppForCurrency");e("ETHAddressNonEIP");e("CantScanQRCode");e("FeeNotLoaded");e("FeeRequired");e("FeeTooHigh");e("DustLimit");e("PendingOperation");e("SyncError");e("PairingFailed");e("GenuineCheckFailed");e("LedgerAPI4xx");e("LedgerAPI5xx");e("FirmwareOrAppUpdateRequired");e("LanguageNotFound");e("NoDBPathGiven");e("DBWrongPassword");e("DBNotReset");var x;(function(r){r[r.Unknown=0]="Unknown",r[r.BleLocationServicesDisabled=1]="BleLocationServicesDisabled",r[r.BleBluetoothUnauthorized=2]="BleBluetoothUnauthorized",r[r.BleScanStartFailed=3]="BleScanStartFailed"})(x||(x={}));(function(r){C(t,r);function t(n,o){var a=r.call(this,o)||this;return a.name="HwTransportError",a.type=n,Object.setPrototypeOf(a,t.prototype),a}return t})(Error);var E=function(r){C(t,r);function t(n,o){var a=this,i="TransportError";return a=r.call(this,n||i)||this,a.name=i,a.message=n,a.stack=new Error().stack,a.id=o,a}return t}(Error);A("TransportError",function(r){return new E(r.message,r.id)});var g={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,CUSTOM_IMAGE_BOOTLOADER:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761};function k(r){switch(r){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=r&&r<=28671)return"Internal error, please report"}function m(r){var t=Object.keys(g).find(function(i){return g[i]===r})||"UNKNOWN_ERROR",n=k(r)||t,o=r.toString(16),a="Ledger device: ".concat(n," (0x").concat(o,")");if(r===g.LOCKED_DEVICE)throw new B(a);this.name="TransportStatusError",this.message=a,this.stack=new Error().stack,this.statusCode=r,this.statusText=t}m.prototype=new Error;A("TransportStatusError",function(r){return new m(r.statusCode)});var D=5;function G(r){var t=Buffer.alloc(2);return t.writeUInt16BE(r,0),t}var q={data:Buffer.alloc(0),dataLength:0,sequence:0},z=function(r,t){return{makeBlocks:function(n){var o=Buffer.concat([G(n.length),n]),a=t-5,i=Math.ceil(o.length/a);o=Buffer.concat([o,Buffer.alloc(i*a-o.length+1).fill(0)]);for(var u=[],c=0;c<i;c++){var d=Buffer.alloc(5);d.writeUInt16BE(r,0),d.writeUInt8(D,2),d.writeUInt16BE(c,3);var v=o.slice(c*a,(c+1)*a);u.push(Buffer.concat([d,v]))}return u},reduceResponse:function(n,o){var a=n||q,i=a.data,u=a.dataLength,c=a.sequence;if(o.readUInt16BE(0)!==r)throw new E("Invalid channel","InvalidChannel");if(o.readUInt8(2)!==D)throw new E("Invalid tag","InvalidTag");if(o.readUInt16BE(3)!==c)throw new E("Invalid sequence","InvalidSequence");n||(u=o.readUInt16BE(5)),c++;var d=o.slice(n?5:7);return i=Buffer.concat([i,d]),i.length>u&&(i=i.slice(0,u)),{data:i,dataLength:u,sequence:c}},getReducedResult:function(n){if(n&&n.dataLength===n.data.length)return n.data}}},_=function(){return _=Object.assign||function(r){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},_.apply(this,arguments)},f,s;(function(r){r.blue="blue",r.nanoS="nanoS",r.nanoSP="nanoSP",r.nanoX="nanoX",r.stax="stax"})(s||(s={}));var O=(f={},f[s.blue]={id:s.blue,productName:"Ledger Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:480*1024,masks:[822083584,822149120],getBlockSize:function(r){return 4*1024}},f[s.nanoS]={id:s.nanoS,productName:"Ledger Nano S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:320*1024,masks:[823132160],getBlockSize:function(r){var t;return N.lt((t=N.coerce(r))!==null&&t!==void 0?t:"","2.0.0")?4*1024:2*1024}},f[s.nanoSP]={id:s.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1536*1024,masks:[856686592],getBlockSize:function(r){return 32}},f[s.nanoX]={id:s.nanoX,productName:"Ledger Nano X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,masks:[855638016],getBlockSize:function(r){return 4*1024},bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},f[s.stax]={id:s.stax,productName:"Ledger Stax",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:1536*1024,masks:[857735168],getBlockSize:function(r){return 32},bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]},f);s.blue,s.nanoS,s.nanoSP,s.nanoX,s.stax;var T=Object.values(O),j=11415,V=function(r){var t=T.find(function(a){return a.legacyUsbProductId===r});if(t)return t;var n=r>>8,o=T.find(function(a){return a.productIdMM===n});return o},H=[],U={};for(var W in O){var h=O[W],S=h.bluetoothSpec;if(S)for(var I=0;I<S.length;I++){var p=S[I];H.push(p.serviceUuid),U[p.serviceUuid]=U[p.serviceUuid.replace(/-/g,"")]=_({deviceModel:h},p)}}var X=0,l=[],K=function(r,t,n){var o={type:r,id:String(++X),date:new Date};t&&(o.message=t),Q(o)},Y=function(r){return l.push(r),function(){var t=l.indexOf(r);t!==-1&&(l[t]=l[l.length-1],l.pop())}};function Q(r){for(var t=0;t<l.length;t++)try{l[t](r)}catch(n){console.error(n)}}typeof window<"u"&&(window.__ledgerLogsListen=Y);exports.DisconnectedDevice=P;exports.DisconnectedDeviceDuringOperation=w;exports.TransportError=E;exports.TransportInterfaceNotAvailable=M;exports.TransportOpenUserCancelled=b;exports.TransportWebUSBGestureRequired=F;exports.createHIDframing=z;exports.identifyUSBProductId=V;exports.ledgerUSBVendorId=j;exports.log=K;
|