@onekeyfe/onekey-aptos-provider 1.1.1 → 1.1.2

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.
@@ -2,6 +2,7 @@ import { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core';
2
2
  import { Types, MaybeHexString } from 'aptos';
3
3
  import { TxnPayload, TxnOptions } from './types';
4
4
  import { ProviderAptos } from './OnekeyAptosProvider';
5
+ declare type AnyNumber = bigint | number;
5
6
  export declare type AptosRequestMartian = {
6
7
  'martianSignAndSubmitTransaction': (transactions: string) => Promise<string>;
7
8
  'martianSignTransaction': (transactions: string) => Promise<string>;
@@ -38,19 +39,21 @@ declare class ProviderAptosMartian extends ProviderAptos {
38
39
  private _convertStringToUint8Array;
39
40
  submitTransaction(transaction: Uint8Array | string): Promise<string>;
40
41
  getTransactions(query?: {
41
- start?: BigInt | number;
42
+ start?: AnyNumber;
42
43
  limit?: number;
43
44
  }): Promise<Types.Transaction[]>;
44
45
  getTransaction(txnHash: string): Promise<Types.Transaction>;
45
46
  getAccountTransactions(accountAddress: MaybeHexString, query?: {
46
- start?: BigInt | number;
47
+ start?: AnyNumber;
47
48
  limit?: number;
48
49
  }): Promise<Types.Transaction[]>;
49
50
  getAccountResources(accountAddress: MaybeHexString, query?: {
50
- ledgerVersion?: BigInt | number;
51
+ ledgerVersion?: AnyNumber;
51
52
  }): Promise<Types.MoveResource[]>;
52
53
  getAccount(accountAddress: MaybeHexString): Promise<Types.AccountData>;
53
- getChainId(): Promise<number>;
54
+ getChainId(): Promise<{
55
+ chainId: number;
56
+ }>;
54
57
  getLedgerInfo(): Promise<Types.IndexResponse>;
55
58
  }
56
59
  export { ProviderAptosMartian };
@@ -177,7 +177,8 @@ class ProviderAptosMartian extends ProviderAptos {
177
177
  getChainId() {
178
178
  return __awaiter(this, void 0, void 0, function* () {
179
179
  const client = yield this.getClient();
180
- return client.getChainId();
180
+ const chainId = yield client.getChainId();
181
+ return { chainId };
181
182
  });
182
183
  }
183
184
  getLedgerInfo() {
@@ -180,7 +180,8 @@ class ProviderAptosMartian extends OnekeyAptosProvider_1.ProviderAptos {
180
180
  getChainId() {
181
181
  return __awaiter(this, void 0, void 0, function* () {
182
182
  const client = yield this.getClient();
183
- return client.getChainId();
183
+ const chainId = yield client.getChainId();
184
+ return { chainId };
184
185
  });
185
186
  }
186
187
  getLedgerInfo() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/onekey-aptos-provider",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "keywords": [
5
5
  "cross-inpage-provider"
6
6
  ],
@@ -28,12 +28,12 @@
28
28
  "start": "tsc --watch"
29
29
  },
30
30
  "dependencies": {
31
- "@onekeyfe/cross-inpage-provider-core": "1.1.1",
32
- "@onekeyfe/cross-inpage-provider-errors": "1.1.1",
33
- "@onekeyfe/cross-inpage-provider-types": "1.1.1",
34
- "@onekeyfe/extension-bridge-injected": "1.1.1",
35
- "aptos": "^1.3.13",
31
+ "@onekeyfe/cross-inpage-provider-core": "1.1.2",
32
+ "@onekeyfe/cross-inpage-provider-errors": "1.1.2",
33
+ "@onekeyfe/cross-inpage-provider-types": "1.1.2",
34
+ "@onekeyfe/extension-bridge-injected": "1.1.2",
35
+ "aptos": "^1.3.16",
36
36
  "eth-rpc-errors": "^4.0.3"
37
37
  },
38
- "gitHead": "0e154292e7c988c7e82300fca2e02de191872f2b"
38
+ "gitHead": "08aef327a2fec587de325b1f9dc69caa97a86686"
39
39
  }