@onekeyfe/onekey-cosmos-provider 2.1.17-alpha.0 → 2.1.18

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.
@@ -7,11 +7,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
11
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
12
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
10
13
  /* eslint-disable @typescript-eslint/no-explicit-any */
11
14
  /* eslint-disable tsdoc/syntax */
12
15
  import { bytesToHex, hexToBytes } from '@noble/hashes/utils';
13
16
  import { getOrCreateExtInjectedJsBridge } from '@onekeyfe/extension-bridge-injected';
14
17
  import { ProviderCosmosBase } from './ProviderCosmosBase';
18
+ // @ts-ignore
15
19
  import Long from 'long';
16
20
  import { CosmJSOfflineSigner, CosmJSOfflineSignerOnlyAmino } from './cosmjs';
17
21
  import { isArray } from 'lodash';
@@ -185,8 +189,8 @@ class ProviderCosmos extends ProviderCosmosBase {
185
189
  });
186
190
  }
187
191
  signDirect(chainId, signer, signDoc, signOptions) {
188
- var _a;
189
192
  return __awaiter(this, void 0, void 0, function* () {
193
+ var _a;
190
194
  const res = yield this._callBridge({
191
195
  method: 'signDirect',
192
196
  // @ts-expect-error
@@ -207,7 +211,7 @@ class ProviderCosmos extends ProviderCosmosBase {
207
211
  bodyBytes: hexToBytes(res.signed.bodyBytes),
208
212
  // @ts-expect-error
209
213
  authInfoBytes: hexToBytes(res.signed.authInfoBytes),
210
- // @ts-expect-error
214
+ // @ts-ignore
211
215
  accountNumber: Long.fromString(res.signed.accountNumber),
212
216
  chainId: res.signed.chainId,
213
217
  } });
@@ -13,11 +13,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ProviderCosmos = void 0;
16
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
17
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
18
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
16
19
  /* eslint-disable @typescript-eslint/no-explicit-any */
17
20
  /* eslint-disable tsdoc/syntax */
18
21
  const utils_1 = require("@noble/hashes/utils");
19
22
  const extension_bridge_injected_1 = require("@onekeyfe/extension-bridge-injected");
20
23
  const ProviderCosmosBase_1 = require("./ProviderCosmosBase");
24
+ // @ts-ignore
21
25
  const long_1 = __importDefault(require("long"));
22
26
  const cosmjs_1 = require("./cosmjs");
23
27
  const lodash_1 = require("lodash");
@@ -191,8 +195,8 @@ class ProviderCosmos extends ProviderCosmosBase_1.ProviderCosmosBase {
191
195
  });
192
196
  }
193
197
  signDirect(chainId, signer, signDoc, signOptions) {
194
- var _a;
195
198
  return __awaiter(this, void 0, void 0, function* () {
199
+ var _a;
196
200
  const res = yield this._callBridge({
197
201
  method: 'signDirect',
198
202
  // @ts-expect-error
@@ -213,7 +217,7 @@ class ProviderCosmos extends ProviderCosmosBase_1.ProviderCosmosBase {
213
217
  bodyBytes: (0, utils_1.hexToBytes)(res.signed.bodyBytes),
214
218
  // @ts-expect-error
215
219
  authInfoBytes: (0, utils_1.hexToBytes)(res.signed.authInfoBytes),
216
- // @ts-expect-error
220
+ // @ts-ignore
217
221
  accountNumber: long_1.default.fromString(res.signed.accountNumber),
218
222
  chainId: res.signed.chainId,
219
223
  } });
@@ -13,6 +13,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CosmJSOfflineSigner = exports.CosmJSOfflineSignerOnlyAmino = void 0;
16
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */
17
+ // @ts-ignore
16
18
  const long_1 = __importDefault(require("long"));
17
19
  class CosmJSOfflineSignerOnlyAmino {
18
20
  constructor(chainId, service) {
@@ -6,4 +6,4 @@ var EthSignType;
6
6
  EthSignType["MESSAGE"] = "message";
7
7
  EthSignType["TRANSACTION"] = "transaction";
8
8
  EthSignType["EIP712"] = "eip-712";
9
- })(EthSignType = exports.EthSignType || (exports.EthSignType = {}));
9
+ })(EthSignType || (exports.EthSignType = EthSignType = {}));
@@ -4,7 +4,8 @@
4
4
  To reduce the bundle size of provider, put them directly here.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.fromHex = exports.toHex = void 0;
7
+ exports.toHex = toHex;
8
+ exports.fromHex = fromHex;
8
9
  function toHex(data) {
9
10
  let out = "";
10
11
  for (const byte of data) {
@@ -12,7 +13,6 @@ function toHex(data) {
12
13
  }
13
14
  return out;
14
15
  }
15
- exports.toHex = toHex;
16
16
  function fromHex(hexstring) {
17
17
  if (hexstring.length % 2 !== 0) {
18
18
  throw new Error("hex string length must be a multiple of 2");
@@ -27,4 +27,3 @@ function fromHex(hexstring) {
27
27
  }
28
28
  return new Uint8Array(listOfInts);
29
29
  }
30
- exports.fromHex = fromHex;
package/dist/cosmjs.js CHANGED
@@ -7,6 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call */
11
+ // @ts-ignore
10
12
  import Long from 'long';
11
13
  export class CosmJSOfflineSignerOnlyAmino {
12
14
  constructor(chainId, service) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/onekey-cosmos-provider",
3
- "version": "2.1.17-alpha.0",
3
+ "version": "2.1.18",
4
4
  "keywords": [
5
5
  "cross-inpage-provider"
6
6
  ],
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@noble/hashes": "^1.3.0",
32
- "@onekeyfe/cross-inpage-provider-core": "2.1.17-alpha.0",
33
- "@onekeyfe/cross-inpage-provider-errors": "2.1.17-alpha.0",
34
- "@onekeyfe/cross-inpage-provider-types": "2.1.17-alpha.0",
35
- "@onekeyfe/extension-bridge-injected": "2.1.17-alpha.0",
32
+ "@onekeyfe/cross-inpage-provider-core": "2.1.18",
33
+ "@onekeyfe/cross-inpage-provider-errors": "2.1.18",
34
+ "@onekeyfe/cross-inpage-provider-types": "2.1.18",
35
+ "@onekeyfe/extension-bridge-injected": "2.1.18",
36
36
  "eth-rpc-errors": "^4.0.3",
37
37
  "long": "^5.2.1",
38
38
  "mitt": "^3.0.0"
39
39
  },
40
- "gitHead": "2f084706f4501f4d8850017cd9586b825db88e5e"
40
+ "gitHead": "37fa1037312327275e28c3acea89fd2110430328"
41
41
  }