@tatumio/algo 2.0.1-alpha.383 → 2.0.1-alpha.383.2

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.383",
3
+ "version": "2.0.1-alpha.383.2",
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.383",
10
- "@tatumio/api-client": "2.0.1-alpha.383",
9
+ "@tatumio/shared-testing-common": "2.0.1-alpha.383.2",
10
+ "@tatumio/api-client": "2.0.1-alpha.383.2",
11
11
  "axios": "^0.26.0",
12
12
  "form-data": "^4.0.0",
13
- "@tatumio/shared-core": "2.0.1-alpha.383",
14
- "@tatumio/shared-abstract-sdk": "2.0.1-alpha.383",
13
+ "@tatumio/shared-core": "2.0.1-alpha.383.2",
14
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.383.2",
15
15
  "bignumber.js": "^9.0.2",
16
16
  "lodash": "^4.17.21",
17
- "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.383",
17
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.383.2",
18
18
  "algosdk": "^1.13.1",
19
19
  "base32.js": "^0.1.0",
20
20
  "url-parse": "^1.5.10",
@@ -16,7 +16,26 @@ const prepareCreateFTSignedTransaction = ({ body, testnet = false, algoWeb, prov
16
16
  const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
17
17
  ? body.from
18
18
  : (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
19
- const txn = algosdk.makeAssetCreateTxnWithSuggestedParams(from, undefined, new bignumber_js_1.BigNumber(body.supply).shiftedBy(new bignumber_js_1.BigNumber(body.digits).toNumber()).toNumber(), new bignumber_js_1.BigNumber(body.digits).toNumber(), false, from, undefined, undefined, undefined, body.symbol, body.name, body.url, undefined, Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }));
19
+ const decimals = body.digits || 0;
20
+ /**
21
+ * By default, total = 2 decimals = 1 -> will create supply = 0.2
22
+ * To simplify it for customers we add zeros to the end of the number
23
+ */
24
+ const total = new bignumber_js_1.BigNumber(body.supply).shiftedBy(decimals).toNumber();
25
+ const txn = algosdk.makeAssetCreateTxnWithSuggestedParamsFromObject({
26
+ from,
27
+ total,
28
+ decimals,
29
+ assetName: body.symbol,
30
+ unitName: body.name,
31
+ assetURL: body.url,
32
+ defaultFrozen: false,
33
+ freeze: undefined,
34
+ manager: undefined,
35
+ clawback: undefined,
36
+ reserve: undefined,
37
+ suggestedParams: Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }),
38
+ });
20
39
  if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
21
40
  return JSON.stringify(txn);
22
41
  }
@@ -32,7 +51,8 @@ const prepareTransferFTSignedTransaction = ({ body, testnet = false, algoWeb, pr
32
51
  const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
33
52
  ? body.from
34
53
  : (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
35
- const txn = algosdk.makeAssetTransferTxnWithSuggestedParams(from, body.to, undefined, undefined, new bignumber_js_1.BigNumber(body.amount).shiftedBy(body.digits || 1).toNumber(), undefined, Number(body.contractAddress), Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }), undefined);
54
+ const decimals = body.digits || 0;
55
+ const txn = algosdk.makeAssetTransferTxnWithSuggestedParams(from, body.to, undefined, undefined, new bignumber_js_1.BigNumber(body.amount).shiftedBy(decimals).toNumber(), undefined, Number(body.contractAddress), Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }), undefined);
36
56
  if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
37
57
  return JSON.stringify(txn);
38
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"algo.tx.fungible.js","sourceRoot":"","sources":["../../../../../../../../packages/blockchain/algo/src/lib/services/tx/algo.tx.fungible.ts"],"names":[],"mappings":";;;;AAAA,sEAAgE;AAChE,yDAAkC;AAClC,+CAAwC;AASxC,yBAAyB;AACzB,aAAa;AACb,kEAA8B;AAE9B,gDAA2C;AAEpC,MAAM,gCAAgC,GAAG,CAAO,EACrD,IAAI,EACJ,OAAO,GAAG,KAAK,EACf,OAAO,EACP,QAAQ,GAMT,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACxD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAA;IAE5D,MAAM,OAAO,GAAG,IAAI,mBAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;IAEvD,MAAM,IAAI,GAAG,IAAA,uCAAiB,EAAC,IAA0B,CAAC;QACxD,CAAC,CAAE,IAA2B,CAAC,IAAI;QACnC,CAAC,CAAC,IAAA,wBAAU,GAAE,CAAC,8BAA8B,CAAE,IAAwB,CAAC,cAAc,CAAC,CAAA;IAEzF,MAAM,GAAG,GAAG,OAAO,CAAC,qCAAqC,CACvD,IAAI,EACJ,SAAS,EACT,IAAI,wBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,IAAI,wBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,EACtF,IAAI,wBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EACrC,KAAK,EACL,IAAI,EACJ,SAAS,EACT,SAAS,EACT,SAAS,EACT,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,IAAI,EACR,IAAwB,CAAC,GAAG,EAC7B,SAAS,kCAEJ,MAAM,KACT,GAA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CAAC,cAAc,CAAC,CAAA;IAEpE,MAAM,GAAG,GAAG,OAAO,CAAC,sCAAsC,CACxD,IAAI,EACJ,SAAS,EACT,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,kCAEvB,MAAM,KACT,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,OAAO,EAC1C,OAAO,EAAE,IAAI,KAEf,SAAS,CACV,CAAA;IAED,IAAI,IAAA,uCAAiB,EAAC,IAAI,CAAC,EAAE;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;KAC3B;IAED,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAA;IACxE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAExC,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC/C,CAAC,CAAA,CAAA;AAxCY,QAAA,8BAA8B,kCAwC1C"}
1
+ {"version":3,"file":"algo.tx.fungible.js","sourceRoot":"","sources":["../../../../../../../../packages/blockchain/algo/src/lib/services/tx/algo.tx.fungible.ts"],"names":[],"mappings":";;;;AAAA,sEAAgE;AAChE,yDAAkC;AAClC,+CAAwC;AASxC,yBAAyB;AACzB,aAAa;AACb,kEAA8B;AAE9B,gDAA2C;AAEpC,MAAM,gCAAgC,GAAG,CAAO,EACrD,IAAI,EACJ,OAAO,GAAG,KAAK,EACf,OAAO,EACP,QAAQ,GAMT,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACxD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAA;IAE5D,MAAM,OAAO,GAAG,IAAI,mBAAM,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IAED,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAA;IACxE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAExC,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC/C,CAAC,CAAA,CAAA;AAxCY,QAAA,8BAA8B,kCAwC1C"}
@@ -19,9 +19,23 @@ const prepareCreateNFTSignedTransaction = ({ body, testnet = false, algoWeb, pro
19
19
  : (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
20
20
  const decimals = ((_a = body.attr) === null || _a === void 0 ? void 0 : _a['decimals']) || 0;
21
21
  const total = new bignumber_js_1.BigNumber(((_b = body.attr) === null || _b === void 0 ? void 0 : _b['total']) || 1)
22
- .multipliedBy(Math.pow(10, decimals))
22
+ // .multipliedBy(10 ** decimals)
23
23
  .toNumber();
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 }));
24
+ const txn = algosdk.makeAssetCreateTxnWithSuggestedParamsFromObject({
25
+ from,
26
+ total,
27
+ decimals,
28
+ defaultFrozen: false,
29
+ freeze: (_c = body.attr) === null || _c === void 0 ? void 0 : _c.freeze,
30
+ manager: (_d = body.attr) === null || _d === void 0 ? void 0 : _d.manager,
31
+ clawback: (_e = body.attr) === null || _e === void 0 ? void 0 : _e.clawback,
32
+ reserve: (_f = body.attr) === null || _f === void 0 ? void 0 : _f.reserve,
33
+ unitName: (_g = body.attr) === null || _g === void 0 ? void 0 : _g.assetUnit,
34
+ assetName: body.name,
35
+ assetURL: body.url,
36
+ assetMetadataHash: undefined,
37
+ suggestedParams: Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }),
38
+ });
25
39
  if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
26
40
  return JSON.stringify(txn);
27
41
  }
@@ -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;;IACH,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACxD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAA;IAE5D,MAAM,OAAO,GAAG,IAAI,mBAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;IAEvD,MAAM,IAAI,GAAG,IAAA,uCAAiB,EAAC,IAAI,CAAC;QAClC,CAAC,CAAC,IAAI,CAAC,IAAI;QACX,CAAC,CAAC,IAAA,wBAAU,GAAE,CAAC,8BAA8B,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IAEpE,MAAM,QAAQ,GAAG,CAAA,MAAC,IAA0C,CAAC,IAAI,0CAAG,UAAU,CAAC,KAAI,CAAC,CAAA;IACpF,MAAM,KAAK,GAAG,IAAI,wBAAS,CAAC,CAAA,MAAC,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