@tatumio/celo 2.0.1-alpha.386 → 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.
|
|
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.
|
|
9
|
-
"@tatumio/api-client": "2.0.1-alpha.
|
|
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.
|
|
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.
|
|
16
|
-
"@tatumio/shared-core": "2.0.1-alpha.
|
|
17
|
-
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.
|
|
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.
|
|
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
|
},
|
package/src/lib/celo.sdk.d.ts
CHANGED
|
@@ -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: "
|
|
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
|
|
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:
|
|
23
|
-
|
|
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;
|
|
1
|
+
{"version":3,"file":"celo.web3.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/celo/src/lib/services/celo.web3.ts"],"names":[],"mappings":";;;;AAAA,sFAAmE;AAGnE,oDAA2D;AAEpD,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,mCAAmC;gBACnC,OAAO,CAAC,MAAM,kCAAqB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAA;YAChF,CAAC;SAAA,IACF;AACH,CAAC,CAAA;AApBY,QAAA,QAAQ,YAoBpB"}
|