@tatumio/tron 2.0.1-alpha.327 → 2.0.1-alpha.329

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.
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@tatumio/tron",
3
- "version": "2.0.1-alpha.327",
3
+ "version": "2.0.1-alpha.329",
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.327",
10
- "@tatumio/api-client": "2.0.1-alpha.327",
9
+ "@tatumio/shared-testing-common": "2.0.1-alpha.329",
10
+ "@tatumio/api-client": "2.0.1-alpha.329",
11
11
  "axios": "^0.26.0",
12
12
  "form-data": "^4.0.0",
13
- "@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.327",
14
- "@tatumio/shared-abstract-sdk": "2.0.1-alpha.327",
13
+ "@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.329",
14
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.329",
15
15
  "bignumber.js": "^9.0.2",
16
- "@tatumio/shared-core": "2.0.1-alpha.327",
17
- "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.327",
16
+ "@tatumio/shared-core": "2.0.1-alpha.329",
17
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.329",
18
18
  "ethereumjs-wallet": "^1.0.2",
19
19
  "bip39": "^3.0.2",
20
20
  "web3": "^1.7.4",
@@ -9,15 +9,16 @@ const tronweb_1 = tslib_1.__importDefault(require("tronweb"));
9
9
  const tronWeb = () => {
10
10
  return {
11
11
  getClient: (provider) => {
12
- var _a, _b;
13
- const endpoint = (_a = provider !== null && provider !== void 0 ? provider : process.env['TATUM_API_URL']) !== null && _a !== void 0 ? _a : api_client_1.TATUM_API_CONSTANTS.URL;
12
+ var _a;
13
+ const endpoint = provider ||
14
+ `${process.env['TATUM_API_URL'] || api_client_1.TATUM_API_CONSTANTS.URL}/v3/tron/node/${api_client_1.TATUM_API_CONSTANTS.API_KEY}`;
14
15
  const HttpProvider = tronweb_1.default.providers.HttpProvider;
15
16
  const fullNode = new HttpProvider(endpoint);
16
17
  const solidityNode = new HttpProvider(endpoint);
17
18
  const eventServer = new HttpProvider(endpoint);
18
19
  const tronWebInstace = new tronweb_1.default(fullNode, solidityNode, eventServer);
19
20
  tronWebInstace.setHeader({
20
- 'TRON-PRO-API-KEY': (_b = process.env['TRON_PRO_API_KEY']) !== null && _b !== void 0 ? _b : api_client_1.TATUM_API_CONSTANTS.TRON_PRO_API_KEY,
21
+ 'TRON-PRO-API-KEY': (_a = process.env['TRON_PRO_API_KEY']) !== null && _a !== void 0 ? _a : api_client_1.TATUM_API_CONSTANTS.TRON_PRO_API_KEY,
21
22
  });
22
23
  return tronWebInstace;
23
24
  },
@@ -1 +1 @@
1
- {"version":3,"file":"tron.web.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/tron/src/lib/services/tron.web.ts"],"names":[],"mappings":";;;;AAAA,oDAAyD;AACzD,yDAAyD;AACzD,aAAa;AACb,8DAA6B;AAStB,MAAM,OAAO,GAAG,GAAa,EAAE;IACpC,OAAO;QACL,SAAS,EAAE,CAAC,QAAiB,EAAiB,EAAE;;YAC9C,MAAM,QAAQ,GAAG,MAAA,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,mCAAI,gCAAmB,CAAC,GAAG,CAAA;YAEpF,MAAM,YAAY,GAAG,iBAAO,CAAC,SAAS,CAAC,YAAY,CAAA;YAEnD,MAAM,QAAQ,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAA;YAC3C,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAA;YAC/C,MAAM,WAAW,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAA;YAE9C,MAAM,cAAc,GAAG,I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CAAC,CAAA;AAxBY,QAAA,OAAO,WAwBnB"}
@@ -1,4 +1,4 @@
1
- import { TronService } from '@tatumio/api-client';
1
+ import { BlockchainUtilsService, TronService } from '@tatumio/api-client';
2
2
  import { SDKArguments } from '@tatumio/shared-abstract-sdk';
3
3
  export declare const TatumTronSDK: (args: SDKArguments) => {
4
4
  transaction: {
@@ -158,6 +158,7 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
158
158
  getAccount: typeof TronService.tronGetAccount;
159
159
  getTransaction: typeof TronService.tronGetTransaction;
160
160
  sendTransaction: typeof TronService.tronTransfer;
161
+ smartContractGetAddress: typeof BlockchainUtilsService.scGetContractAddress;
161
162
  };
162
163
  offchain: {
163
164
  depositAddress: {
@@ -198,4 +199,63 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
198
199
  delete: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialDeleteWallet;
199
200
  get: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialGetWallet;
200
201
  };
202
+ ledger: {
203
+ customer: {
204
+ get: typeof import("@tatumio/api-client").CustomerService.getCustomerByExternalOrInternalId;
205
+ getAll: typeof import("@tatumio/api-client").CustomerService.findAllCustomers;
206
+ update: typeof import("@tatumio/api-client").CustomerService.updateCustomer;
207
+ activate: typeof import("@tatumio/api-client").CustomerService.activateCustomer;
208
+ deactivate: typeof import("@tatumio/api-client").CustomerService.deactivateCustomer;
209
+ enable: typeof import("@tatumio/api-client").CustomerService.enableCustomer;
210
+ disable: typeof import("@tatumio/api-client").CustomerService.disableCustomer;
211
+ };
212
+ orderBook: {
213
+ getHistorical: typeof import("@tatumio/api-client").OrderBookService.getHistoricalTradesBody;
214
+ getActiveBuyTrades: typeof import("@tatumio/api-client").OrderBookService.getBuyTradesBody;
215
+ getActiveSellTrades: typeof import("@tatumio/api-client").OrderBookService.getSellTradesBody;
216
+ newTrade: typeof import("@tatumio/api-client").OrderBookService.storeTrade;
217
+ get: typeof import("@tatumio/api-client").OrderBookService.getTradeById;
218
+ cancel: typeof import("@tatumio/api-client").OrderBookService.deleteTrade;
219
+ cancelByAccount: typeof import("@tatumio/api-client").OrderBookService.deleteAccountTrades;
220
+ };
221
+ transaction: {
222
+ send: typeof import("@tatumio/api-client").TransactionService.sendTransaction;
223
+ sendMultiple: typeof import("@tatumio/api-client").TransactionService.sendTransactionBatch;
224
+ getAll: typeof import("@tatumio/api-client").TransactionService.getTransactions;
225
+ getAllByAccount: typeof import("@tatumio/api-client").TransactionService.getTransactionsByAccountId;
226
+ getAllByCustomer: typeof import("@tatumio/api-client").TransactionService.getTransactionsByCustomerId;
227
+ getAllByReference: typeof import("@tatumio/api-client").TransactionService.getTransactionsByReference;
228
+ countByAccount: (filter: import("@tatumio/api-client").TransactionFilter) => import("@tatumio/api-client").CancelablePromise<number | import("@tatumio/api-client").Transaction[]>;
229
+ countByCustomer: (filter: import("@tatumio/api-client").TransactionFilterCustomer) => import("@tatumio/api-client").CancelablePromise<number | import("@tatumio/api-client").Transaction[]>;
230
+ };
231
+ virtualCurrency: {
232
+ create: typeof import("@tatumio/api-client").VirtualCurrencyService.createCurrency;
233
+ mint: typeof import("@tatumio/api-client").VirtualCurrencyService.mintCurrency;
234
+ revoke: typeof import("@tatumio/api-client").VirtualCurrencyService.revokeCurrency;
235
+ getByName: typeof import("@tatumio/api-client").VirtualCurrencyService.getCurrency;
236
+ update: typeof import("@tatumio/api-client").VirtualCurrencyService.updateCurrency;
237
+ };
238
+ blockAmount: {
239
+ block: typeof import("@tatumio/api-client").AccountService.blockAmount;
240
+ unblock: typeof import("@tatumio/api-client").AccountService.deleteBlockAmount;
241
+ unblockWithTransaction: typeof import("@tatumio/api-client").AccountService.unblockAmountWithTransaction;
242
+ };
243
+ account: {
244
+ get: typeof import("@tatumio/api-client").AccountService.getAccountByAccountId;
245
+ getAll: typeof import("@tatumio/api-client").AccountService.getAccounts;
246
+ getByCustomerId: typeof import("@tatumio/api-client").AccountService.getAccountsByCustomerId;
247
+ getBalance: typeof import("@tatumio/api-client").AccountService.getAccountBalance;
248
+ create: typeof import("@tatumio/api-client").AccountService.createAccount;
249
+ createMultiple: typeof import("@tatumio/api-client").AccountService.createAccountBatch;
250
+ update: typeof import("@tatumio/api-client").AccountService.updateAccountByAccountId;
251
+ getBlockedAmountsByAccountId: typeof import("@tatumio/api-client").AccountService.getBlockAmountById;
252
+ activate: typeof import("@tatumio/api-client").AccountService.activateAccount;
253
+ deactivate: typeof import("@tatumio/api-client").AccountService.deactivateAccount;
254
+ freeze: typeof import("@tatumio/api-client").AccountService.freezeAccount;
255
+ unfreeze: typeof import("@tatumio/api-client").AccountService.unfreezeAccount;
256
+ generate: (account: import("@tatumio/api-client").CreateAccount & {
257
+ xpub?: string;
258
+ }, generateNewWalletFn: any, generateNewWallet?: boolean, testnet?: boolean, webhookUrl?: string) => Promise<any>;
259
+ };
260
+ };
201
261
  };
@@ -33,6 +33,7 @@ const TatumTronSDK = (args) => {
33
33
  getAccount: api_client_1.TronService.tronGetAccount,
34
34
  getTransaction: api_client_1.TronService.tronGetTransaction,
35
35
  sendTransaction: api_client_1.TronService.tronTransfer,
36
+ smartContractGetAddress: api_client_1.BlockchainUtilsService.scGetContractAddress,
36
37
  } });
37
38
  };
38
39
  exports.TatumTronSDK = TatumTronSDK;
@@ -1 +1 @@
1
- {"version":3,"file":"tron.sdk.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/tron/src/lib/tron.sdk.ts"],"names":[],"mappings":";;;;AAAA,oDAAiD;AACjD,sDAAiD;AAEjD,oFAA2E;AAC3E,kDAA6C;AAC7C,gDAA2C;AAC3C,wDAAmD;AACnD,wDAAmD;AACnD,kDAAoD;AAEpD,MAAM,UAAU,GAAG,wBAAU,CAAC,IAAI,CAAA;AAE3B,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAE,EAAE;IACjD,MAAM,GAAG,GAAG,IAAA,kBAAO,GAAE,CAAA;IACrB,MAAM,SAAS,GAAG,IAAA,gBAAM,EAAC,EAAE,OAAO,EAA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AC,CAAA;AArDY,QAAA,YAAY,gBAqDxB"}
1
+ {"version":3,"file":"tron.sdk.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/tron/src/lib/tron.sdk.ts"],"names":[],"mappings":";;;;AAAA,oDAAyE;AACzE,sDAAiD;AAEjD,oFAA2E;AAC3E,kDAA6C;AAC7C,gDAA2C;AAC3C,wDAAmD;AACnD,wDAAmD;AACnD,kDAAoD;AAEpD,MAAM,UAAU,GAAG,wBAAU,CAAC,IAAI,CAAA;AAE3B,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAE,EAAE;IACjD,MAAM,GAAG,GAAG,IAAA,kBAAO,GAAE,CAAA;IACrB,MAAM,SAAS,GAAG,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAA;IAC1C,MAAM,KAA0B,IAAA,kDAAqB,kCAAM,IAAI,KAAE,UAAU,IAAG,EAAxE,EAAE,GAAG,OAAmE,EAA9D,WAAW,sBAArB,OAAuB,CAAiD,CAAA;IAE9E,MAAM,EACJ,sBAAsB,EACtB,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,GACd,GAAG,GAAG,CAAA;IAEP,uCACK,WAAW,KACd,WAAW,EAAE,SAAS,CAAC,MAAM,EAC7B,KAAK,EAAE,SAAS,CAAC,KAAK,EACtB,KAAK,EAAE,SAAS,CAAC,KAAK,EACtB,GAAG,EAAE,IAAA,yBAAc,EAAC,EAAE,UAAU,EAAE,CAAC,EACnC,GAAG,kCACE,SAAS,CAAC,MAAM,KACnB,sBAAsB;YACtB,OAAO;YACP,WAAW;YACX,gBAAgB;YAChB,OAAO;YACP,gBAAgB;YAChB,iBAAiB;YACjB,oBAAoB;YACpB,iBAAiB;YACjB,aAAa,KAEf,WAAW,EAAE,SAAS,CAAC,WAAW,EAClC,aAAa,EAAE,SAAS,CAAC,aAAa,EACtC,SA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