@tatumio/algo 2.0.1-alpha.381.2 → 2.0.1-alpha.381.3

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@tatumio/algo",
3
- "version": "2.0.1-alpha.381.2",
3
+ "version": "2.0.1-alpha.381.3",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "main": "./src/index.js",
7
7
  "types": "./src/index.d.ts",
8
8
  "dependencies": {
9
- "@tatumio/shared-testing-common": "2.0.1-alpha.381.2",
10
- "@tatumio/api-client": "2.0.1-alpha.381.2",
9
+ "@tatumio/shared-testing-common": "2.0.1-alpha.381.3",
10
+ "@tatumio/api-client": "2.0.1-alpha.381.3",
11
11
  "axios": "^0.26.0",
12
12
  "form-data": "^4.0.0",
13
- "@tatumio/shared-core": "2.0.1-alpha.381.2",
14
- "@tatumio/shared-abstract-sdk": "2.0.1-alpha.381.2",
13
+ "@tatumio/shared-core": "2.0.1-alpha.381.3",
14
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.381.3",
15
15
  "bignumber.js": "^9.0.2",
16
16
  "lodash": "^4.17.21",
17
- "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.381.2",
17
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.381.3",
18
18
  "algosdk": "^1.13.1",
19
19
  "base32.js": "^0.1.0",
20
20
  "url-parse": "^1.5.10",
@@ -10,7 +10,7 @@ const algosdk = tslib_1.__importStar(require("algosdk"));
10
10
  const bignumber_js_1 = require("bignumber.js");
11
11
  const algo_wallet_1 = require("../algo.wallet");
12
12
  const prepareCreateNFTSignedTransaction = ({ body, testnet = false, algoWeb, provider, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
13
- var _a, _b, _c, _d, _e, _f;
13
+ var _a, _b, _c, _d, _e, _f, _g;
14
14
  const algodClient = algoWeb.getClient(testnet, provider);
15
15
  const params = yield algodClient.getTransactionParams().do();
16
16
  const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
@@ -21,7 +21,7 @@ const prepareCreateNFTSignedTransaction = ({ body, testnet = false, algoWeb, pro
21
21
  const total = new bignumber_js_1.BigNumber(((_b = body.attr) === null || _b === void 0 ? void 0 : _b['total']) || 1)
22
22
  .multipliedBy(Math.pow(10, decimals))
23
23
  .toNumber();
24
- const txn = algosdk.makeAssetCreateTxnWithSuggestedParams(from, undefined, total, decimals, false, from, (_c = body.attr) === null || _c === void 0 ? void 0 : _c.reserve, (_d = body.attr) === null || _d === void 0 ? void 0 : _d.freeze, (_e = body.attr) === null || _e === void 0 ? void 0 : _e.clawback, (_f = body.attr) === null || _f === void 0 ? void 0 : _f.assetUnit, body.name, body.url, undefined, Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }));
24
+ const txn = algosdk.makeAssetCreateTxnWithSuggestedParams(from, undefined, total, decimals, false, (_c = body.attr) === null || _c === void 0 ? void 0 : _c.manager, (_d = body.attr) === null || _d === void 0 ? void 0 : _d.reserve, (_e = body.attr) === null || _e === void 0 ? void 0 : _e.freeze, (_f = body.attr) === null || _f === void 0 ? void 0 : _f.clawback, (_g = body.attr) === null || _g === void 0 ? void 0 : _g.assetUnit, body.name, body.url, undefined, Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }));
25
25
  if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
26
26
  return JSON.stringify(txn);
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"algo.tx.nft.js","sourceRoot":"","sources":["../../../../../../../../packages/blockchain/algo/src/lib/services/tx/algo.tx.nft.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,aAAa;AACb,kEAA8B;AAC9B,sEAAgE;AAChE,yDAAkC;AAClC,+CAAwC;AAWxC,gDAA2C;AAGpC,MAAM,iCAAiC,GAAG,CAAO,EACtD,IAAI,EACJ,OAAO,GAAG,KAAK,EACf,OAAO,EACP,QAAQ,GAMT,EAAE,EAAE;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