@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
package/dist/index-LYdmc_QU.mjs
DELETED
|
@@ -1,449 +0,0 @@
|
|
|
1
|
-
import x from "semver";
|
|
2
|
-
var y = /* @__PURE__ */ function() {
|
|
3
|
-
var r = function(t, n) {
|
|
4
|
-
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, a) {
|
|
5
|
-
o.__proto__ = a;
|
|
6
|
-
} || function(o, a) {
|
|
7
|
-
for (var i in a) Object.prototype.hasOwnProperty.call(a, i) && (o[i] = a[i]);
|
|
8
|
-
}, r(t, n);
|
|
9
|
-
};
|
|
10
|
-
return function(t, n) {
|
|
11
|
-
if (typeof n != "function" && n !== null)
|
|
12
|
-
throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
13
|
-
r(t, n);
|
|
14
|
-
function o() {
|
|
15
|
-
this.constructor = t;
|
|
16
|
-
}
|
|
17
|
-
t.prototype = n === null ? Object.create(n) : (o.prototype = n.prototype, new o());
|
|
18
|
-
};
|
|
19
|
-
}(), R = {}, A = function(r, t) {
|
|
20
|
-
R[r] = t;
|
|
21
|
-
}, e = function(r) {
|
|
22
|
-
var t = (
|
|
23
|
-
/** @class */
|
|
24
|
-
function(n) {
|
|
25
|
-
y(o, n);
|
|
26
|
-
function o(a, i, u) {
|
|
27
|
-
var c = (
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
n.call(this, a || r, u) || this
|
|
31
|
-
);
|
|
32
|
-
if (Object.setPrototypeOf(c, o.prototype), c.name = r, i)
|
|
33
|
-
for (var d in i)
|
|
34
|
-
c[d] = i[d];
|
|
35
|
-
if (u && L(u) && "cause" in u && !("cause" in c)) {
|
|
36
|
-
var v = u.cause;
|
|
37
|
-
c.cause = v, "stack" in v && (c.stack = c.stack + `
|
|
38
|
-
CAUSE: ` + v.stack);
|
|
39
|
-
}
|
|
40
|
-
return c;
|
|
41
|
-
}
|
|
42
|
-
return o;
|
|
43
|
-
}(Error)
|
|
44
|
-
);
|
|
45
|
-
return t;
|
|
46
|
-
};
|
|
47
|
-
function L(r) {
|
|
48
|
-
return typeof r == "object";
|
|
49
|
-
}
|
|
50
|
-
var C = /* @__PURE__ */ function() {
|
|
51
|
-
var r = function(t, n) {
|
|
52
|
-
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, a) {
|
|
53
|
-
o.__proto__ = a;
|
|
54
|
-
} || function(o, a) {
|
|
55
|
-
for (var i in a) Object.prototype.hasOwnProperty.call(a, i) && (o[i] = a[i]);
|
|
56
|
-
}, r(t, n);
|
|
57
|
-
};
|
|
58
|
-
return function(t, n) {
|
|
59
|
-
if (typeof n != "function" && n !== null)
|
|
60
|
-
throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
61
|
-
r(t, n);
|
|
62
|
-
function o() {
|
|
63
|
-
this.constructor = t;
|
|
64
|
-
}
|
|
65
|
-
t.prototype = n === null ? Object.create(n) : (o.prototype = n.prototype, new o());
|
|
66
|
-
};
|
|
67
|
-
}();
|
|
68
|
-
e("AccountNameRequired");
|
|
69
|
-
e("AccountNotSupported");
|
|
70
|
-
e("AmountRequired");
|
|
71
|
-
e("BluetoothRequired");
|
|
72
|
-
e("BtcUnmatchedApp");
|
|
73
|
-
e("CantOpenDevice");
|
|
74
|
-
e("CashAddrNotSupported");
|
|
75
|
-
e("CurrencyNotSupported");
|
|
76
|
-
e("DeviceAppVerifyNotSupported");
|
|
77
|
-
e("DeviceGenuineSocketEarlyClose");
|
|
78
|
-
e("DeviceNotGenuine");
|
|
79
|
-
e("DeviceOnDashboardExpected");
|
|
80
|
-
e("DeviceOnDashboardUnexpected");
|
|
81
|
-
e("DeviceInOSUExpected");
|
|
82
|
-
e("DeviceHalted");
|
|
83
|
-
e("DeviceNameInvalid");
|
|
84
|
-
e("DeviceSocketFail");
|
|
85
|
-
e("DeviceSocketNoBulkStatus");
|
|
86
|
-
var B = e("LockedDeviceError"), q = e("DisconnectedDevice"), V = e("DisconnectedDeviceDuringOperation");
|
|
87
|
-
e("DeviceExtractOnboardingStateError");
|
|
88
|
-
e("DeviceOnboardingStatePollingError");
|
|
89
|
-
e("EnpointConfig");
|
|
90
|
-
e("EthAppPleaseEnableContractData");
|
|
91
|
-
e("FeeEstimationFailed");
|
|
92
|
-
e("FirmwareNotRecognized");
|
|
93
|
-
e("HardResetFail");
|
|
94
|
-
e("InvalidXRPTag");
|
|
95
|
-
e("InvalidAddress");
|
|
96
|
-
e("InvalidAddressBecauseDestinationIsAlsoSource");
|
|
97
|
-
e("LatestMCUInstalledError");
|
|
98
|
-
e("UnknownMCU");
|
|
99
|
-
e("LedgerAPIError");
|
|
100
|
-
e("LedgerAPIErrorWithMessage");
|
|
101
|
-
e("LedgerAPINotAvailable");
|
|
102
|
-
e("ManagerAppAlreadyInstalled");
|
|
103
|
-
e("ManagerAppRelyOnBTC");
|
|
104
|
-
e("ManagerAppDepInstallRequired");
|
|
105
|
-
e("ManagerAppDepUninstallRequired");
|
|
106
|
-
e("ManagerDeviceLocked");
|
|
107
|
-
e("ManagerFirmwareNotEnoughSpace");
|
|
108
|
-
e("ManagerNotEnoughSpace");
|
|
109
|
-
e("ManagerUninstallBTCDep");
|
|
110
|
-
e("NetworkDown");
|
|
111
|
-
e("NoAddressesFound");
|
|
112
|
-
e("NotEnoughBalance");
|
|
113
|
-
e("NotEnoughBalanceToDelegate");
|
|
114
|
-
e("NotEnoughBalanceInParentAccount");
|
|
115
|
-
e("NotEnoughSpendableBalance");
|
|
116
|
-
e("NotEnoughBalanceBecauseDestinationNotCreated");
|
|
117
|
-
e("NoAccessToCamera");
|
|
118
|
-
e("NotEnoughGas");
|
|
119
|
-
e("NotSupportedLegacyAddress");
|
|
120
|
-
e("GasLessThanEstimate");
|
|
121
|
-
e("PriorityFeeTooLow");
|
|
122
|
-
e("PriorityFeeTooHigh");
|
|
123
|
-
e("PriorityFeeHigherThanMaxFee");
|
|
124
|
-
e("MaxFeeTooLow");
|
|
125
|
-
e("PasswordsDontMatch");
|
|
126
|
-
e("PasswordIncorrect");
|
|
127
|
-
e("RecommendSubAccountsToEmpty");
|
|
128
|
-
e("RecommendUndelegation");
|
|
129
|
-
e("TimeoutTagged");
|
|
130
|
-
e("UnexpectedBootloader");
|
|
131
|
-
e("MCUNotGenuineToDashboard");
|
|
132
|
-
e("RecipientRequired");
|
|
133
|
-
e("UnavailableTezosOriginatedAccountReceive");
|
|
134
|
-
e("UnavailableTezosOriginatedAccountSend");
|
|
135
|
-
e("UpdateFetchFileFail");
|
|
136
|
-
e("UpdateIncorrectHash");
|
|
137
|
-
e("UpdateIncorrectSig");
|
|
138
|
-
e("UpdateYourApp");
|
|
139
|
-
e("UserRefusedDeviceNameChange");
|
|
140
|
-
e("UserRefusedAddress");
|
|
141
|
-
e("UserRefusedFirmwareUpdate");
|
|
142
|
-
e("UserRefusedAllowManager");
|
|
143
|
-
e("UserRefusedOnDevice");
|
|
144
|
-
var H = e("TransportOpenUserCancelled"), W = e("TransportInterfaceNotAvailable");
|
|
145
|
-
e("TransportRaceCondition");
|
|
146
|
-
var X = e("TransportWebUSBGestureRequired");
|
|
147
|
-
e("DeviceShouldStayInApp");
|
|
148
|
-
e("WebsocketConnectionError");
|
|
149
|
-
e("WebsocketConnectionFailed");
|
|
150
|
-
e("WrongDeviceForAccount");
|
|
151
|
-
e("WrongAppForCurrency");
|
|
152
|
-
e("ETHAddressNonEIP");
|
|
153
|
-
e("CantScanQRCode");
|
|
154
|
-
e("FeeNotLoaded");
|
|
155
|
-
e("FeeRequired");
|
|
156
|
-
e("FeeTooHigh");
|
|
157
|
-
e("DustLimit");
|
|
158
|
-
e("PendingOperation");
|
|
159
|
-
e("SyncError");
|
|
160
|
-
e("PairingFailed");
|
|
161
|
-
e("GenuineCheckFailed");
|
|
162
|
-
e("LedgerAPI4xx");
|
|
163
|
-
e("LedgerAPI5xx");
|
|
164
|
-
e("FirmwareOrAppUpdateRequired");
|
|
165
|
-
e("LanguageNotFound");
|
|
166
|
-
e("NoDBPathGiven");
|
|
167
|
-
e("DBWrongPassword");
|
|
168
|
-
e("DBNotReset");
|
|
169
|
-
var N;
|
|
170
|
-
(function(r) {
|
|
171
|
-
r[r.Unknown = 0] = "Unknown", r[r.BleLocationServicesDisabled = 1] = "BleLocationServicesDisabled", r[r.BleBluetoothUnauthorized = 2] = "BleBluetoothUnauthorized", r[r.BleScanStartFailed = 3] = "BleScanStartFailed";
|
|
172
|
-
})(N || (N = {}));
|
|
173
|
-
(function(r) {
|
|
174
|
-
C(t, r);
|
|
175
|
-
function t(n, o) {
|
|
176
|
-
var a = r.call(this, o) || this;
|
|
177
|
-
return a.name = "HwTransportError", a.type = n, Object.setPrototypeOf(a, t.prototype), a;
|
|
178
|
-
}
|
|
179
|
-
return t;
|
|
180
|
-
})(Error);
|
|
181
|
-
var p = (
|
|
182
|
-
/** @class */
|
|
183
|
-
function(r) {
|
|
184
|
-
C(t, r);
|
|
185
|
-
function t(n, o) {
|
|
186
|
-
var a = this, i = "TransportError";
|
|
187
|
-
return a = r.call(this, n || i) || this, a.name = i, a.message = n, a.stack = new Error().stack, a.id = o, a;
|
|
188
|
-
}
|
|
189
|
-
return t;
|
|
190
|
-
}(Error)
|
|
191
|
-
);
|
|
192
|
-
A("TransportError", function(r) {
|
|
193
|
-
return new p(r.message, r.id);
|
|
194
|
-
});
|
|
195
|
-
var g = {
|
|
196
|
-
ACCESS_CONDITION_NOT_FULFILLED: 38916,
|
|
197
|
-
ALGORITHM_NOT_SUPPORTED: 38020,
|
|
198
|
-
CLA_NOT_SUPPORTED: 28160,
|
|
199
|
-
CODE_BLOCKED: 38976,
|
|
200
|
-
CODE_NOT_INITIALIZED: 38914,
|
|
201
|
-
COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 27009,
|
|
202
|
-
CONDITIONS_OF_USE_NOT_SATISFIED: 27013,
|
|
203
|
-
CONTRADICTION_INVALIDATION: 38928,
|
|
204
|
-
CONTRADICTION_SECRET_CODE_STATUS: 38920,
|
|
205
|
-
CUSTOM_IMAGE_BOOTLOADER: 26159,
|
|
206
|
-
CUSTOM_IMAGE_EMPTY: 26158,
|
|
207
|
-
FILE_ALREADY_EXISTS: 27273,
|
|
208
|
-
FILE_NOT_FOUND: 37892,
|
|
209
|
-
GP_AUTH_FAILED: 25344,
|
|
210
|
-
HALTED: 28586,
|
|
211
|
-
INCONSISTENT_FILE: 37896,
|
|
212
|
-
INCORRECT_DATA: 27264,
|
|
213
|
-
INCORRECT_LENGTH: 26368,
|
|
214
|
-
INCORRECT_P1_P2: 27392,
|
|
215
|
-
INS_NOT_SUPPORTED: 27904,
|
|
216
|
-
INVALID_KCV: 38021,
|
|
217
|
-
INVALID_OFFSET: 37890,
|
|
218
|
-
LICENSING: 28482,
|
|
219
|
-
LOCKED_DEVICE: 21781,
|
|
220
|
-
MAX_VALUE_REACHED: 38992,
|
|
221
|
-
MEMORY_PROBLEM: 37440,
|
|
222
|
-
MISSING_CRITICAL_PARAMETER: 26624,
|
|
223
|
-
NO_EF_SELECTED: 37888,
|
|
224
|
-
NOT_ENOUGH_MEMORY_SPACE: 27268,
|
|
225
|
-
OK: 36864,
|
|
226
|
-
PIN_REMAINING_ATTEMPTS: 25536,
|
|
227
|
-
REFERENCED_DATA_NOT_FOUND: 27272,
|
|
228
|
-
SECURITY_STATUS_NOT_SATISFIED: 27010,
|
|
229
|
-
TECHNICAL_PROBLEM: 28416,
|
|
230
|
-
UNKNOWN_APDU: 27906,
|
|
231
|
-
USER_REFUSED_ON_DEVICE: 21761
|
|
232
|
-
};
|
|
233
|
-
function P(r) {
|
|
234
|
-
switch (r) {
|
|
235
|
-
case 26368:
|
|
236
|
-
return "Incorrect length";
|
|
237
|
-
case 26624:
|
|
238
|
-
return "Missing critical parameter";
|
|
239
|
-
case 27010:
|
|
240
|
-
return "Security not satisfied (dongle locked or have invalid access rights)";
|
|
241
|
-
case 27013:
|
|
242
|
-
return "Condition of use not satisfied (denied by the user?)";
|
|
243
|
-
case 27264:
|
|
244
|
-
return "Invalid data received";
|
|
245
|
-
case 27392:
|
|
246
|
-
return "Invalid parameter received";
|
|
247
|
-
case 21781:
|
|
248
|
-
return "Locked device";
|
|
249
|
-
}
|
|
250
|
-
if (28416 <= r && r <= 28671)
|
|
251
|
-
return "Internal error, please report";
|
|
252
|
-
}
|
|
253
|
-
function m(r) {
|
|
254
|
-
var t = Object.keys(g).find(function(i) {
|
|
255
|
-
return g[i] === r;
|
|
256
|
-
}) || "UNKNOWN_ERROR", n = P(r) || t, o = r.toString(16), a = "Ledger device: ".concat(n, " (0x").concat(o, ")");
|
|
257
|
-
if (r === g.LOCKED_DEVICE)
|
|
258
|
-
throw new B(a);
|
|
259
|
-
this.name = "TransportStatusError", this.message = a, this.stack = new Error().stack, this.statusCode = r, this.statusText = t;
|
|
260
|
-
}
|
|
261
|
-
m.prototype = new Error();
|
|
262
|
-
A("TransportStatusError", function(r) {
|
|
263
|
-
return new m(r.statusCode);
|
|
264
|
-
});
|
|
265
|
-
var D = 5;
|
|
266
|
-
function w(r) {
|
|
267
|
-
var t = Buffer.alloc(2);
|
|
268
|
-
return t.writeUInt16BE(r, 0), t;
|
|
269
|
-
}
|
|
270
|
-
var b = {
|
|
271
|
-
data: Buffer.alloc(0),
|
|
272
|
-
dataLength: 0,
|
|
273
|
-
sequence: 0
|
|
274
|
-
}, K = function(r, t) {
|
|
275
|
-
return {
|
|
276
|
-
makeBlocks: function(n) {
|
|
277
|
-
var o = Buffer.concat([w(n.length), n]), a = t - 5, i = Math.ceil(o.length / a);
|
|
278
|
-
o = Buffer.concat([
|
|
279
|
-
o,
|
|
280
|
-
Buffer.alloc(i * a - o.length + 1).fill(0)
|
|
281
|
-
]);
|
|
282
|
-
for (var u = [], c = 0; c < i; c++) {
|
|
283
|
-
var d = Buffer.alloc(5);
|
|
284
|
-
d.writeUInt16BE(r, 0), d.writeUInt8(D, 2), d.writeUInt16BE(c, 3);
|
|
285
|
-
var v = o.slice(c * a, (c + 1) * a);
|
|
286
|
-
u.push(Buffer.concat([d, v]));
|
|
287
|
-
}
|
|
288
|
-
return u;
|
|
289
|
-
},
|
|
290
|
-
reduceResponse: function(n, o) {
|
|
291
|
-
var a = n || b, i = a.data, u = a.dataLength, c = a.sequence;
|
|
292
|
-
if (o.readUInt16BE(0) !== r)
|
|
293
|
-
throw new p("Invalid channel", "InvalidChannel");
|
|
294
|
-
if (o.readUInt8(2) !== D)
|
|
295
|
-
throw new p("Invalid tag", "InvalidTag");
|
|
296
|
-
if (o.readUInt16BE(3) !== c)
|
|
297
|
-
throw new p("Invalid sequence", "InvalidSequence");
|
|
298
|
-
n || (u = o.readUInt16BE(5)), c++;
|
|
299
|
-
var d = o.slice(n ? 5 : 7);
|
|
300
|
-
return i = Buffer.concat([i, d]), i.length > u && (i = i.slice(0, u)), {
|
|
301
|
-
data: i,
|
|
302
|
-
dataLength: u,
|
|
303
|
-
sequence: c
|
|
304
|
-
};
|
|
305
|
-
},
|
|
306
|
-
getReducedResult: function(n) {
|
|
307
|
-
if (n && n.dataLength === n.data.length)
|
|
308
|
-
return n.data;
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
}, I = function() {
|
|
312
|
-
return I = Object.assign || function(r) {
|
|
313
|
-
for (var t, n = 1, o = arguments.length; n < o; n++) {
|
|
314
|
-
t = arguments[n];
|
|
315
|
-
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (r[a] = t[a]);
|
|
316
|
-
}
|
|
317
|
-
return r;
|
|
318
|
-
}, I.apply(this, arguments);
|
|
319
|
-
}, f, s;
|
|
320
|
-
(function(r) {
|
|
321
|
-
r.blue = "blue", r.nanoS = "nanoS", r.nanoSP = "nanoSP", r.nanoX = "nanoX", r.stax = "stax";
|
|
322
|
-
})(s || (s = {}));
|
|
323
|
-
var O = (f = {}, f[s.blue] = {
|
|
324
|
-
id: s.blue,
|
|
325
|
-
productName: "Ledger Blue",
|
|
326
|
-
productIdMM: 0,
|
|
327
|
-
legacyUsbProductId: 0,
|
|
328
|
-
usbOnly: !0,
|
|
329
|
-
memorySize: 480 * 1024,
|
|
330
|
-
masks: [822083584, 822149120],
|
|
331
|
-
getBlockSize: function(r) {
|
|
332
|
-
return 4 * 1024;
|
|
333
|
-
}
|
|
334
|
-
}, f[s.nanoS] = {
|
|
335
|
-
id: s.nanoS,
|
|
336
|
-
productName: "Ledger Nano S",
|
|
337
|
-
productIdMM: 16,
|
|
338
|
-
legacyUsbProductId: 1,
|
|
339
|
-
usbOnly: !0,
|
|
340
|
-
memorySize: 320 * 1024,
|
|
341
|
-
masks: [823132160],
|
|
342
|
-
getBlockSize: function(r) {
|
|
343
|
-
var t;
|
|
344
|
-
return x.lt((t = x.coerce(r)) !== null && t !== void 0 ? t : "", "2.0.0") ? 4 * 1024 : 2 * 1024;
|
|
345
|
-
}
|
|
346
|
-
}, f[s.nanoSP] = {
|
|
347
|
-
id: s.nanoSP,
|
|
348
|
-
productName: "Ledger Nano S Plus",
|
|
349
|
-
productIdMM: 80,
|
|
350
|
-
legacyUsbProductId: 5,
|
|
351
|
-
usbOnly: !0,
|
|
352
|
-
memorySize: 1536 * 1024,
|
|
353
|
-
masks: [856686592],
|
|
354
|
-
getBlockSize: function(r) {
|
|
355
|
-
return 32;
|
|
356
|
-
}
|
|
357
|
-
}, f[s.nanoX] = {
|
|
358
|
-
id: s.nanoX,
|
|
359
|
-
productName: "Ledger Nano X",
|
|
360
|
-
productIdMM: 64,
|
|
361
|
-
legacyUsbProductId: 4,
|
|
362
|
-
usbOnly: !1,
|
|
363
|
-
memorySize: 2 * 1024 * 1024,
|
|
364
|
-
masks: [855638016],
|
|
365
|
-
getBlockSize: function(r) {
|
|
366
|
-
return 4 * 1024;
|
|
367
|
-
},
|
|
368
|
-
bluetoothSpec: [
|
|
369
|
-
{
|
|
370
|
-
serviceUuid: "13d63400-2c97-0004-0000-4c6564676572",
|
|
371
|
-
notifyUuid: "13d63400-2c97-0004-0001-4c6564676572",
|
|
372
|
-
writeUuid: "13d63400-2c97-0004-0002-4c6564676572",
|
|
373
|
-
writeCmdUuid: "13d63400-2c97-0004-0003-4c6564676572"
|
|
374
|
-
}
|
|
375
|
-
]
|
|
376
|
-
}, f[s.stax] = {
|
|
377
|
-
id: s.stax,
|
|
378
|
-
productName: "Ledger Stax",
|
|
379
|
-
productIdMM: 96,
|
|
380
|
-
legacyUsbProductId: 6,
|
|
381
|
-
usbOnly: !1,
|
|
382
|
-
memorySize: 1536 * 1024,
|
|
383
|
-
masks: [857735168],
|
|
384
|
-
getBlockSize: function(r) {
|
|
385
|
-
return 32;
|
|
386
|
-
},
|
|
387
|
-
bluetoothSpec: [
|
|
388
|
-
{
|
|
389
|
-
serviceUuid: "13d63400-2c97-6004-0000-4c6564676572",
|
|
390
|
-
notifyUuid: "13d63400-2c97-6004-0001-4c6564676572",
|
|
391
|
-
writeUuid: "13d63400-2c97-6004-0002-4c6564676572",
|
|
392
|
-
writeCmdUuid: "13d63400-2c97-6004-0003-4c6564676572"
|
|
393
|
-
}
|
|
394
|
-
]
|
|
395
|
-
}, f);
|
|
396
|
-
s.blue, s.nanoS, s.nanoSP, s.nanoX, s.stax;
|
|
397
|
-
var T = Object.values(O), Y = 11415, Q = function(r) {
|
|
398
|
-
var t = T.find(function(a) {
|
|
399
|
-
return a.legacyUsbProductId === r;
|
|
400
|
-
});
|
|
401
|
-
if (t)
|
|
402
|
-
return t;
|
|
403
|
-
var n = r >> 8, o = T.find(function(a) {
|
|
404
|
-
return a.productIdMM === n;
|
|
405
|
-
});
|
|
406
|
-
return o;
|
|
407
|
-
}, M = [], h = {};
|
|
408
|
-
for (var F in O) {
|
|
409
|
-
var U = O[F], S = U.bluetoothSpec;
|
|
410
|
-
if (S)
|
|
411
|
-
for (var _ = 0; _ < S.length; _++) {
|
|
412
|
-
var E = S[_];
|
|
413
|
-
M.push(E.serviceUuid), h[E.serviceUuid] = h[E.serviceUuid.replace(/-/g, "")] = I({ deviceModel: U }, E);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
var k = 0, l = [], Z = function(r, t, n) {
|
|
417
|
-
var o = {
|
|
418
|
-
type: r,
|
|
419
|
-
id: String(++k),
|
|
420
|
-
date: /* @__PURE__ */ new Date()
|
|
421
|
-
};
|
|
422
|
-
t && (o.message = t), G(o);
|
|
423
|
-
}, z = function(r) {
|
|
424
|
-
return l.push(r), function() {
|
|
425
|
-
var t = l.indexOf(r);
|
|
426
|
-
t !== -1 && (l[t] = l[l.length - 1], l.pop());
|
|
427
|
-
};
|
|
428
|
-
};
|
|
429
|
-
function G(r) {
|
|
430
|
-
for (var t = 0; t < l.length; t++)
|
|
431
|
-
try {
|
|
432
|
-
l[t](r);
|
|
433
|
-
} catch (n) {
|
|
434
|
-
console.error(n);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
typeof window < "u" && (window.__ledgerLogsListen = z);
|
|
438
|
-
export {
|
|
439
|
-
V as D,
|
|
440
|
-
H as T,
|
|
441
|
-
p as a,
|
|
442
|
-
Y as b,
|
|
443
|
-
K as c,
|
|
444
|
-
q as d,
|
|
445
|
-
W as e,
|
|
446
|
-
X as f,
|
|
447
|
-
Q as i,
|
|
448
|
-
Z as l
|
|
449
|
-
};
|