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

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/tron",
3
- "version": "2.0.1-alpha.327",
3
+ "version": "2.0.1-alpha.328",
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.328",
10
+ "@tatumio/api-client": "2.0.1-alpha.328",
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.328",
14
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.328",
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.328",
17
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.328",
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,IAAI,iBAAO,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,CAAC,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63 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
198
198
  delete: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialDeleteWallet;
199
199
  get: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialGetWallet;
200
200
  };
201
+ ledger: {
202
+ customer: {
203
+ get: typeof import("@tatumio/api-client").CustomerService.getCustomerByExternalOrInternalId;
204
+ getAll: typeof import("@tatumio/api-client").CustomerService.findAllCustomers;
205
+ update: typeof import("@tatumio/api-client").CustomerService.updateCustomer;
206
+ activate: typeof import("@tatumio/api-client").CustomerService.activateCustomer;
207
+ deactivate: typeof import("@tatumio/api-client").CustomerService.deactivateCustomer;
208
+ enable: typeof import("@tatumio/api-client").CustomerService.enableCustomer;
209
+ disable: typeof import("@tatumio/api-client").CustomerService.disableCustomer;
210
+ };
211
+ orderBook: {
212
+ getHistorical: typeof import("@tatumio/api-client").OrderBookService.getHistoricalTradesBody;
213
+ getActiveBuyTrades: typeof import("@tatumio/api-client").OrderBookService.getBuyTradesBody;
214
+ getActiveSellTrades: typeof import("@tatumio/api-client").OrderBookService.getSellTradesBody;
215
+ newTrade: typeof import("@tatumio/api-client").OrderBookService.storeTrade;
216
+ get: typeof import("@tatumio/api-client").OrderBookService.getTradeById;
217
+ cancel: typeof import("@tatumio/api-client").OrderBookService.deleteTrade;
218
+ cancelByAccount: typeof import("@tatumio/api-client").OrderBookService.deleteAccountTrades;
219
+ };
220
+ transaction: {
221
+ send: typeof import("@tatumio/api-client").TransactionService.sendTransaction;
222
+ sendMultiple: typeof import("@tatumio/api-client").TransactionService.sendTransactionBatch;
223
+ getAll: typeof import("@tatumio/api-client").TransactionService.getTransactions;
224
+ getAllByAccount: typeof import("@tatumio/api-client").TransactionService.getTransactionsByAccountId;
225
+ getAllByCustomer: typeof import("@tatumio/api-client").TransactionService.getTransactionsByCustomerId;
226
+ getAllByReference: typeof import("@tatumio/api-client").TransactionService.getTransactionsByReference;
227
+ countByAccount: (filter: import("@tatumio/api-client").TransactionFilter) => import("@tatumio/api-client").CancelablePromise<number | import("@tatumio/api-client").Transaction[]>;
228
+ countByCustomer: (filter: import("@tatumio/api-client").TransactionFilterCustomer) => import("@tatumio/api-client").CancelablePromise<number | import("@tatumio/api-client").Transaction[]>;
229
+ };
230
+ virtualCurrency: {
231
+ create: typeof import("@tatumio/api-client").VirtualCurrencyService.createCurrency;
232
+ mint: typeof import("@tatumio/api-client").VirtualCurrencyService.mintCurrency;
233
+ revoke: typeof import("@tatumio/api-client").VirtualCurrencyService.revokeCurrency;
234
+ getByName: typeof import("@tatumio/api-client").VirtualCurrencyService.getCurrency;
235
+ update: typeof import("@tatumio/api-client").VirtualCurrencyService.updateCurrency;
236
+ };
237
+ blockAmount: {
238
+ block: typeof import("@tatumio/api-client").AccountService.blockAmount;
239
+ unblock: typeof import("@tatumio/api-client").AccountService.deleteBlockAmount;
240
+ unblockWithTransaction: typeof import("@tatumio/api-client").AccountService.unblockAmountWithTransaction;
241
+ };
242
+ account: {
243
+ get: typeof import("@tatumio/api-client").AccountService.getAccountByAccountId;
244
+ getAll: typeof import("@tatumio/api-client").AccountService.getAccounts;
245
+ getByCustomerId: typeof import("@tatumio/api-client").AccountService.getAccountsByCustomerId;
246
+ getBalance: typeof import("@tatumio/api-client").AccountService.getAccountBalance;
247
+ create: typeof import("@tatumio/api-client").AccountService.createAccount;
248
+ createMultiple: typeof import("@tatumio/api-client").AccountService.createAccountBatch;
249
+ update: typeof import("@tatumio/api-client").AccountService.updateAccountByAccountId;
250
+ getBlockedAmountsByAccountId: typeof import("@tatumio/api-client").AccountService.getBlockAmountById;
251
+ activate: typeof import("@tatumio/api-client").AccountService.activateAccount;
252
+ deactivate: typeof import("@tatumio/api-client").AccountService.deactivateAccount;
253
+ freeze: typeof import("@tatumio/api-client").AccountService.freezeAccount;
254
+ unfreeze: typeof import("@tatumio/api-client").AccountService.unfreezeAccount;
255
+ generate: (account: import("@tatumio/api-client").CreateAccount & {
256
+ xpub?: string;
257
+ }, generateNewWalletFn: any, generateNewWallet?: boolean, testnet?: boolean, webhookUrl?: string) => Promise<any>;
258
+ };
259
+ };
201
260
  };