@tatumio/algo 2.0.1-alpha.382.1 → 2.0.1-alpha.383.1
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.
|
3
|
+
"version": "2.0.1-alpha.383.1",
|
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.
|
10
|
-
"@tatumio/api-client": "2.0.1-alpha.
|
9
|
+
"@tatumio/shared-testing-common": "2.0.1-alpha.383.1",
|
10
|
+
"@tatumio/api-client": "2.0.1-alpha.383.1",
|
11
11
|
"axios": "^0.26.0",
|
12
12
|
"form-data": "^4.0.0",
|
13
|
-
"@tatumio/shared-core": "2.0.1-alpha.
|
14
|
-
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.
|
13
|
+
"@tatumio/shared-core": "2.0.1-alpha.383.1",
|
14
|
+
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.383.1",
|
15
15
|
"bignumber.js": "^9.0.2",
|
16
16
|
"lodash": "^4.17.21",
|
17
|
-
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.
|
17
|
+
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.383.1",
|
18
18
|
"algosdk": "^1.13.1",
|
19
19
|
"base32.js": "^0.1.0",
|
20
20
|
"url-parse": "^1.5.10",
|
@@ -16,7 +16,8 @@ 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
|
19
|
+
const decimals = body.digits || 0;
|
20
|
+
const txn = algosdk.makeAssetCreateTxnWithSuggestedParams(from, undefined, new bignumber_js_1.BigNumber(body.supply).shiftedBy(decimals).toNumber(), new bignumber_js_1.BigNumber(decimals).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 }));
|
20
21
|
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
21
22
|
return JSON.stringify(txn);
|
22
23
|
}
|
@@ -32,7 +33,8 @@ const prepareTransferFTSignedTransaction = ({ body, testnet = false, algoWeb, pr
|
|
32
33
|
const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
|
33
34
|
? body.from
|
34
35
|
: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
|
35
|
-
const
|
36
|
+
const decimals = body.digits || 0;
|
37
|
+
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
38
|
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
37
39
|
return JSON.stringify(txn);
|
38
40
|
}
|
@@ -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,
|
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,IA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