@tatumio/celo 2.0.1-alpha.387 → 2.0.1-alpha.388

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/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@tatumio/celo",
3
- "version": "2.0.1-alpha.387",
3
+ "version": "2.0.1-alpha.388",
4
4
  "license": "MIT",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
- "@tatumio/shared-abstract-sdk": "2.0.1-alpha.387",
9
- "@tatumio/api-client": "2.0.1-alpha.387",
8
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.388",
9
+ "@tatumio/api-client": "2.0.1-alpha.388",
10
10
  "axios": "^0.26.0",
11
11
  "form-data": "^4.0.0",
12
- "@tatumio/shared-testing-common": "2.0.1-alpha.387",
12
+ "@tatumio/shared-testing-common": "2.0.1-alpha.388",
13
13
  "bignumber.js": "^9.0.2",
14
14
  "lodash": "^4.17.21",
15
- "@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.387",
16
- "@tatumio/shared-core": "2.0.1-alpha.387",
17
- "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.387",
15
+ "@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.388",
16
+ "@tatumio/shared-core": "2.0.1-alpha.388",
17
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.388",
18
18
  "ethereumjs-wallet": "^1.0.2",
19
19
  "bip39": "^3.0.2",
20
20
  "web3": "^1.7.4",
21
21
  "web3-core": "^1.7.4",
22
22
  "web3-utils": "^1.7.4",
23
- "@tatumio/shared-testing-evm-based": "2.0.1-alpha.387",
23
+ "@tatumio/shared-testing-evm-based": "2.0.1-alpha.388",
24
24
  "@celo-tools/celo-ethers-wrapper": "^0.1.0",
25
25
  "tslib": "^2.0.0"
26
26
  },
@@ -56,7 +56,7 @@ export declare const TatumCeloSDK: (args: SDKArguments) => {
56
56
  getNFTRoyalty: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftGetRoyaltyErc721;
57
57
  getNFTAccountBalance: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftGetBalanceErc721;
58
58
  getNFTContractAddress: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftGetContractAddress;
59
- getNFTImage: (chain: "CELO" | "BSC" | "ETH" | "KLAY" | "KCS" | "MATIC" | "ONE" | "FLOW" | "TRON" | "SOL", contractAddress: string, tokenId: string, account?: string) => Promise<{
59
+ getNFTImage: (chain: "ETH" | "CELO" | "BSC" | "KLAY" | "KCS" | "MATIC" | "ONE" | "FLOW" | "TRON" | "SOL", contractAddress: string, tokenId: string, account?: string) => Promise<{
60
60
  originalUrl: string;
61
61
  publicUrl: string;
62
62
  }>;
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.celoWeb3 = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const shared_blockchain_evm_based_1 = require("@tatumio/shared-blockchain-evm-based");
6
- const web3_1 = tslib_1.__importDefault(require("web3"));
7
- const shared_core_1 = require("@tatumio/shared-core");
6
+ const api_client_1 = require("@tatumio/api-client");
8
7
  const celoWeb3 = (args) => {
9
8
  const evmBasedWeb3Result = (0, shared_blockchain_evm_based_1.evmBasedWeb3)(args);
10
9
  return Object.assign(Object.assign({}, evmBasedWeb3Result), { getClient(provider, fromPrivateKey) {
@@ -17,18 +16,9 @@ const celoWeb3 = (args) => {
17
16
  return web3;
18
17
  },
19
18
  getGasPriceInWei() {
20
- var _a;
21
19
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
- // TODO: Not used. Celo should be redone to extend EVM methods.
23
- // Instead this obtainWalletInformation is used to get gasPrice right now, in future it should be replaced maybe
24
- let gasStationUrl = shared_core_1.THIRD_PARTY_API.ETH_GAS_STATION;
25
- const gasStationApiKey = process.env['TATUM_GAS_STATION_API_KEY']; // @TODO
26
- if (gasStationApiKey) {
27
- gasStationUrl = `${gasStationUrl}?apiKey=${gasStationApiKey}`;
28
- }
29
- const data = (yield shared_core_1.httpHelper.get(gasStationUrl)).data;
30
- const gasPrice = (_a = data['fast']) !== null && _a !== void 0 ? _a : 20;
31
- return web3_1.default.utils.toWei((gasPrice / 10).toString(), 'gwei');
20
+ // TODO: SHOULD BE REPLACED TO CELO
21
+ return (yield api_client_1.BlockchainFeesService.getBlockchainFee('ETH')).medium.toString();
32
22
  });
33
23
  } });
34
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"celo.web3.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/celo/src/lib/services/celo.web3.ts"],"names":[],"mappings":";;;;AAAA,sFAAmE;AACnE,wDAAuB;AACvB,sDAAsF;AAE/E,MAAM,QAAQ,GAAG,CAAC,IAAuD,EAAE,EAAE;IAClF,MAAM,kBAAkB,GAAG,IAAA,0CAAY,EAAC,IAAI,CAAC,CAAA;IAE7C,uCACK,kBAAkB,KACrB,SAAS,CAAC,QAAiB,EAAE,cAAuB;;YAClD,MAAM,IAAI,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,kBAAkB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;YAElE,IAAI,cAAc,EAAE;gBAClB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;gBAC5C,IAAI,CAAC,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;aAC9D;YAED,OAAO,IAAI,CAAA;QACb,CAAC;QACK,gBAAgB;;;gBACpB,+DAA+D;gBAC/D,gHAAgH;gBAChH,IAAI,aAAa,GAAG,6BAAe,CAAC,eAAe,CAAA;gBACnD,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA,CAAC,QAAQ;gBAC1E,IAAI,gBAAgB,EAAE;oBACpB,aAAa,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