apenft-js-tron 2.0.0 → 2.0.1

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.
@@ -1,4 +1,4 @@
1
- import BigNumber from "bignumber.js";
1
+ import BigNumber from 'bignumber.js';
2
2
  export { BigNumber };
3
3
  export declare const NULL_ADDRESS = "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb";
4
4
  export declare const NULL_BLOCK_HASH = "0x0000000000000000000000000000000000000000000000000000000000000000";
@@ -9,33 +9,29 @@ var bignumber_js_1 = __importDefault(require("bignumber.js"));
9
9
  exports.BigNumber = bignumber_js_1.default;
10
10
  var types_1 = require("./types");
11
11
  bignumber_js_1.default.config({ EXPONENTIAL_AT: 1e9 });
12
- var serviceFee = {
13
- Shasta: 50,
14
- Tron: 10
15
- };
16
- window.fetch("https://api.apenft.io/v1/orders/confData")
12
+ window.fetch('https://api.apenft.io/v1/orders/confData')
17
13
  .then(function (response) {
18
14
  return response.json();
19
15
  })
20
16
  .then(function (data) {
21
- serviceFee.Tron = data.data.relayerFee;
17
+ exports.DEFAULT_SELLER_FEE_BASIS_POINTS['tron'] = data.data.relayerFee;
22
18
  }).catch(function (e) {
23
19
  console.log(e);
24
20
  });
25
- window.fetch("https://api-testnet.apenft.io/v1/orders/confData")
21
+ window.fetch('https://api-testnet.apenft.io/v1/orders/confData')
26
22
  .then(function (response) {
27
23
  return response.json();
28
24
  })
29
25
  .then(function (data) {
30
- serviceFee.Shasta = data.data.relayerFee;
26
+ exports.DEFAULT_SELLER_FEE_BASIS_POINTS['shasta'] = data.data.relayerFee;
31
27
  }).catch(function (e) {
32
28
  console.log(e);
33
29
  });
34
30
  // base58
35
- exports.NULL_ADDRESS = "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb";
36
- exports.NULL_BLOCK_HASH = "0x0000000000000000000000000000000000000000000000000000000000000000";
31
+ exports.NULL_ADDRESS = 'T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb';
32
+ exports.NULL_BLOCK_HASH = '0x0000000000000000000000000000000000000000000000000000000000000000';
37
33
  exports.MAX_DIGITS_IN_UNSIGNED_256_INT = 78; // 78 solt
38
- exports.MAX_UINT_256 = "115792089237316195423570985008687907853269984665640564039457584007913129639935"; //new BigNumber(2).pow(256).minus(1).toString()
34
+ exports.MAX_UINT_256 = '115792089237316195423570985008687907853269984665640564039457584007913129639935'; //new BigNumber(2).pow(256).minus(1).toString()
39
35
  exports.MIN_EXPIRATION_SECONDS = 10;
40
36
  exports.MIN_Listing_SECONDS = 10;
41
37
  exports.ORDER_MATCHING_LATENCY_SECONDS = 60 * 60 * 24 * 7;
@@ -43,15 +39,15 @@ exports.ORDER_MATCHING_LATENCY_SECONDS = 60 * 60 * 24 * 7;
43
39
  exports.DEFAULT_BUYER_FEE_BASIS_POINTS = 0;
44
40
  // export const DEFAULT_SELLER_FEE_BASIS_POINTS = 50; // 200 //0.5%
45
41
  exports.DEFAULT_SELLER_FEE_BASIS_POINTS = (_a = {},
46
- _a[types_1.Network.Tron] = serviceFee.Tron,
47
- _a[types_1.Network.Shasta] = serviceFee.Shasta,
42
+ _a[types_1.Network.Tron] = 0,
43
+ _a[types_1.Network.Shasta] = 50,
48
44
  _a);
49
45
  exports.DEFAULT_MAX_BOUNTY = exports.DEFAULT_SELLER_FEE_BASIS_POINTS;
50
46
  //BOUNTY gas fee
51
47
  exports.APENFT_SELLER_BOUNTY_BASIS_POINTS = 100; //1%
52
48
  exports.INVERSE_BASIS_POINT = 10000; //100%
53
49
  //static call
54
- exports.STATIC_EXTRADATA = "0x0c225aad"; //succeed If Tx Origin Matches Hard coded Address
50
+ exports.STATIC_EXTRADATA = '0x0c225aad'; //succeed If Tx Origin Matches Hard coded Address
55
51
  exports.TOKEN_TYPE_MAP = {
56
52
  "TRC-20": "ERC20",
57
53
  "TRC-721": "ERC721",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apenft-js-tron",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Javascript SDK for the APENFT ",
5
5
  "main": "dist/index.js",
6
6
  "author": "Project APENFT Developers",