@onekeyfe/hd-web-sdk 0.1.41 → 0.1.42

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.
@@ -27055,7 +27055,8 @@ var light = __webpack_require__(3448);
27055
27055
  // EXTERNAL MODULE: ../../node_modules/long/src/long.js
27056
27056
  var src_long = __webpack_require__(7808);
27057
27057
  // EXTERNAL MODULE: ../../node_modules/bytebuffer/dist/bytebuffer.js
27058
- var bytebuffer = __webpack_require__(9396);
27058
+ var dist_bytebuffer = __webpack_require__(9396);
27059
+ var bytebuffer_default = /*#__PURE__*/__webpack_require__.n(dist_bytebuffer);
27059
27060
  // EXTERNAL MODULE: ../../node_modules/buffer/index.js
27060
27061
  var buffer = __webpack_require__(8834);
27061
27062
  ;// CONCATENATED MODULE: ../hd-transport/dist/index.js
@@ -27089,11 +27090,6 @@ function __rest(s, e) {
27089
27090
  return t;
27090
27091
  }
27091
27092
 
27092
- function getDefaultExportFromNamespaceIfPresent(n) {
27093
- return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n.default : n;
27094
- }
27095
-
27096
- const ByteBuffer = getDefaultExportFromNamespaceIfPresent(bytebuffer);
27097
27093
  const primitiveTypes = ['bool', 'string', 'bytes', 'int32', 'int64', 'uint32', 'uint64', 'sint32', 'sint64', 'fixed32', 'fixed64', 'sfixed32', 'sfixed64', 'double', 'float'];
27098
27094
 
27099
27095
  const isPrimitiveField = field => primitiveTypes.includes(field);
@@ -27104,7 +27100,7 @@ const transform$1 = (field, value) => {
27104
27100
  }
27105
27101
 
27106
27102
  if (field.type === 'bytes') {
27107
- return ByteBuffer.wrap(value).toString('hex');
27103
+ return bytebuffer_default().wrap(value).toString('hex');
27108
27104
  }
27109
27105
 
27110
27106
  if (field.long) {
@@ -27214,7 +27210,7 @@ const encode$1 = (Message, data) => {
27214
27210
  const payload = patch(Message, data);
27215
27211
  const message = Message.fromObject(payload);
27216
27212
  const buffer = Message.encode(message).finish();
27217
- const bytebuffer = new ByteBuffer(buffer.byteLength);
27213
+ const bytebuffer = new (bytebuffer_default())(buffer.byteLength);
27218
27214
  bytebuffer.append(buffer);
27219
27215
  bytebuffer.reset();
27220
27216
  return bytebuffer;
@@ -27292,7 +27288,7 @@ const decode = byteBuffer => {
27292
27288
  };
27293
27289
 
27294
27290
  const decodeChunked = bytes => {
27295
- const byteBuffer = ByteBuffer.wrap(bytes, undefined, undefined, true);
27291
+ const byteBuffer = bytebuffer_default().wrap(bytes, undefined, undefined, true);
27296
27292
  const {
27297
27293
  sharp1,
27298
27294
  sharp2,
@@ -27324,7 +27320,7 @@ function encode(data, options) {
27324
27320
  messageType
27325
27321
  } = options;
27326
27322
  const fullSize = (addTrezorHeaders ? HEADER_SIZE : HEADER_SIZE - 2) + data.limit;
27327
- const encodedByteBuffer = new ByteBuffer(fullSize);
27323
+ const encodedByteBuffer = new (bytebuffer_default())(fullSize);
27328
27324
 
27329
27325
  if (addTrezorHeaders) {
27330
27326
  encodedByteBuffer.writeByte(MESSAGE_HEADER_BYTE);
@@ -27386,7 +27382,7 @@ const buildBuffers = (messages, name, data) => {
27386
27382
  const outBuffers = [];
27387
27383
 
27388
27384
  for (const buf of encodeBuffers) {
27389
- const chunkBuffer = new ByteBuffer(BUFFER_SIZE + 1);
27385
+ const chunkBuffer = new (bytebuffer_default())(BUFFER_SIZE + 1);
27390
27386
  chunkBuffer.writeByte(MESSAGE_TOP_CHAR);
27391
27387
  chunkBuffer.append(buf);
27392
27388
  chunkBuffer.reset();
@@ -27397,7 +27393,7 @@ const buildBuffers = (messages, name, data) => {
27397
27393
  };
27398
27394
 
27399
27395
  function receiveOne(messages, data) {
27400
- const bytebuffer = ByteBuffer.wrap(data, 'hex');
27396
+ const bytebuffer = bytebuffer_default().wrap(data, 'hex');
27401
27397
  const {
27402
27398
  typeId,
27403
27399
  buffer
@@ -38949,7 +38945,7 @@ const UI_REQUEST = {
38949
38945
  FIRMWARE_NOT_INSTALLED: 'ui-device_firmware_not_installed',
38950
38946
  NOT_USE_ONEKEY_DEVICE: 'ui-device_please_use_onekey_device'
38951
38947
  };
38952
- const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.41"}/`;
38948
+ const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.42"}/`;
38953
38949
  const DEFAULT_PRIORITY = 2;
38954
38950
  const initialSettings = {
38955
38951
  configSrc: './data/config.json',
@@ -46692,7 +46688,7 @@ const src_init = async settings => {
46692
46688
 
46693
46689
  try {
46694
46690
  await builder_init({ ..._settings,
46695
- version: "0.1.41"
46691
+ version: "0.1.42"
46696
46692
  });
46697
46693
  return true;
46698
46694
  } catch (e) {