@clonegod/ttd-sol-common 1.0.141 → 1.0.143

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.
@@ -38,7 +38,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.Helius = void 0;
39
39
  const axios_1 = __importDefault(require("axios"));
40
40
  const web3_js_1 = require("@solana/web3.js");
41
- const sdk_1 = __importDefault(require("@irys/sdk"));
42
41
  const fs = __importStar(require("fs"));
43
42
  const utils_1 = require("./utils");
44
43
  const RpcClient_1 = require("./RpcClient");
@@ -406,27 +405,13 @@ class Helius {
406
405
  }
407
406
  uploadImageToArweave(imagePath, privateKey) {
408
407
  return __awaiter(this, void 0, void 0, function* () {
409
- const irys = new sdk_1.default({
410
- url: this.cluster === 'mainnet-beta'
411
- ? 'https://node2.irys.xyz'
412
- : 'https://devnet.irys.xyz',
413
- token: 'solana',
414
- key: privateKey,
415
- config: {
416
- providerUrl: this.endpoint,
417
- },
418
- });
419
408
  const stats = fs.statSync(imagePath);
420
409
  const fileSizeInBytes = stats.size;
421
410
  const fileSizeInKB = fileSizeInBytes / 1000;
422
411
  if (this.cluster === 'devnet' || fileSizeInKB >= 200) {
423
- const price = yield irys.getPrice(fileSizeInBytes);
424
- yield irys.fund(price, 1.1);
425
412
  }
426
413
  try {
427
- const receipt = yield irys.uploadFile(imagePath);
428
- const url = `https://arweave.net/${receipt.id}`;
429
- return url;
414
+ return '';
430
415
  }
431
416
  catch (e) {
432
417
  throw new Error(`error uploading image to Arweave: ${e}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sol-common",
3
- "version": "1.0.141",
3
+ "version": "1.0.143",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
@@ -13,8 +13,7 @@
13
13
  "push": "npm run build && npm publish"
14
14
  },
15
15
  "dependencies": {
16
- "@clonegod/ttd-common": "^1.0.170",
17
- "@irys/sdk": "^0.2.10",
16
+ "@clonegod/ttd-common": "^1.0.176",
18
17
  "@metaplex-foundation/mpl-token-metadata": "^2.5.2",
19
18
  "@solana/web3.js": "1.91.6",
20
19
  "axios": "^1.2.3",