@tatumio/tron 2.0.1-alpha.376 → 2.0.1-alpha.377
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tatumio/tron",
|
3
|
-
"version": "2.0.1-alpha.
|
3
|
+
"version": "2.0.1-alpha.377",
|
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.377",
|
10
|
+
"@tatumio/api-client": "2.0.1-alpha.377",
|
11
11
|
"axios": "^0.26.0",
|
12
12
|
"form-data": "^4.0.0",
|
13
|
-
"@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.
|
14
|
-
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.
|
13
|
+
"@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.377",
|
14
|
+
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.377",
|
15
15
|
"bignumber.js": "^9.0.2",
|
16
16
|
"lodash": "^4.17.21",
|
17
|
-
"@tatumio/shared-core": "2.0.1-alpha.
|
18
|
-
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.
|
17
|
+
"@tatumio/shared-core": "2.0.1-alpha.377",
|
18
|
+
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.377",
|
19
19
|
"ethereumjs-wallet": "^1.0.2",
|
20
20
|
"bip39": "^3.0.2",
|
21
21
|
"web3": "^1.7.4",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { TronWallet } from '@tatumio/api-client';
|
1
|
+
import { TronWallet, Wallet } from '@tatumio/api-client';
|
2
2
|
import { ITronWeb } from './tron.web';
|
3
3
|
export declare const tronWallet: (args: {
|
4
4
|
tronWeb: ITronWeb;
|
@@ -13,7 +13,7 @@ export declare const tronWallet: (args: {
|
|
13
13
|
* @param mnemonic optional mnemonic seed to use. If not present, new one will be generated
|
14
14
|
* @returns wallet or a combination of address and private key
|
15
15
|
*/
|
16
|
-
generateWallet(mnemonic?: string): Promise<
|
16
|
+
generateWallet(mnemonic?: string): Promise<Wallet>;
|
17
17
|
/**
|
18
18
|
* Generate address
|
19
19
|
* @param xpub extended public key to generate address from
|
package/src/lib/tron.sdk.d.ts
CHANGED
@@ -264,6 +264,10 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
|
|
264
264
|
}, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
265
265
|
};
|
266
266
|
};
|
267
|
+
storage: {
|
268
|
+
upload: typeof import("@tatumio/api-client").IpfsService.storeIpfs;
|
269
|
+
get: typeof import("@tatumio/api-client").IpfsService.getIpfsData;
|
270
|
+
};
|
267
271
|
smartContract: {
|
268
272
|
prepare: {
|
269
273
|
smartContractInvocation: (body: import("./services/tron.tx").CallSmartContract, provider?: string) => Promise<string>;
|
@@ -280,7 +284,7 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
|
|
280
284
|
};
|
281
285
|
wallet: {
|
282
286
|
generateBlockchainWallet: (mnem: string) => Promise<import("@tatumio/api-client").TronWallet>;
|
283
|
-
generateWallet(mnemonic?: string): Promise<import("@tatumio/api-client").
|
287
|
+
generateWallet(mnemonic?: string): Promise<import("@tatumio/api-client").Wallet>;
|
284
288
|
generateAddressFromXPub(xpub: string, i: number): string;
|
285
289
|
generatePrivateKeyFromMnemonic(mnemonic: string, i: number): Promise<string>;
|
286
290
|
generateAddressFromPrivatekey(privateKey: string): string;
|
@@ -367,18 +371,9 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
|
|
367
371
|
getTrc10Detail: typeof TronService.tronTrc10Detail;
|
368
372
|
getAccount: typeof TronService.tronGetAccount;
|
369
373
|
getTransaction: typeof TronService.tronGetTransaction;
|
370
|
-
sendTransaction: typeof TronService.tronTransfer;
|
371
374
|
smartContractGetAddress: typeof BlockchainUtilsService.scGetContractAddress;
|
372
375
|
getTransactions: typeof TronService.tronAccountTx;
|
373
376
|
getTrc20Transactions: typeof TronService.tronAccountTx20;
|
374
|
-
generateWallet: typeof TronService.generateTronwallet;
|
375
|
-
generateAddress: typeof TronService.tronGenerateAddress;
|
376
|
-
generatePrivateKey: typeof TronService.tronGenerateAddressPrivateKey;
|
377
|
-
createTrc10: typeof TronService.tronCreateTrc10;
|
378
|
-
createTrc20: typeof TronService.tronCreateTrc20;
|
379
|
-
transferTrc10: typeof TronService.tronTransferTrc10;
|
380
|
-
transferTrc20: typeof TronService.tronTransferTrc20;
|
381
|
-
tronFreeze: typeof TronService.tronFreeze;
|
382
377
|
};
|
383
378
|
virtualAccount: {
|
384
379
|
send: (body: Omit<import("@tatumio/api-client").TransferTron, "fromPrivateKey"> & Partial<import("@tatumio/api-client").SignatureId & {
|
@@ -407,10 +402,6 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
|
|
407
402
|
storeTokenAddress: any;
|
408
403
|
};
|
409
404
|
getExchangeRate(basePair?: import("@tatumio/api-client").Fiat): import("@tatumio/api-client").CancelablePromise<import("@tatumio/api-client").ExchangeRate>;
|
410
|
-
storage: {
|
411
|
-
upload: typeof import("@tatumio/api-client").IpfsService.storeIpfs;
|
412
|
-
get: typeof import("@tatumio/api-client").IpfsService.getIpfsData;
|
413
|
-
};
|
414
405
|
subscriptions: typeof import("@tatumio/api-client").NotificationSubscriptionsService;
|
415
406
|
security: {
|
416
407
|
checkMaliciousAddress: typeof import("@tatumio/api-client").MaliciousAddressService.checkMalicousAddress;
|
@@ -421,13 +412,6 @@ export declare const TatumTronSDK: (args: SDKArguments) => {
|
|
421
412
|
freezeApiKey: typeof import("@tatumio/api-client").ServiceUtilsService.freezeApiKey;
|
422
413
|
unfreezeApiKey: typeof import("@tatumio/api-client").ServiceUtilsService.unfreezeApiKey;
|
423
414
|
};
|
424
|
-
custodialManagedWallet: {
|
425
|
-
transfer: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialTransferManagedAddress;
|
426
|
-
getAll: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialGetWallets;
|
427
|
-
create: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialCreateWallet;
|
428
|
-
delete: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialDeleteWallet;
|
429
|
-
get: typeof import("@tatumio/api-client").CustodialManagedWalletsService.custodialGetWallet;
|
430
|
-
};
|
431
415
|
ledger: {
|
432
416
|
customer: {
|
433
417
|
get: typeof import("@tatumio/api-client").CustomerService.getCustomerByExternalOrInternalId;
|
package/src/lib/tron.sdk.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.TatumTronSDK = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
4
|
const api_client_1 = require("@tatumio/api-client");
|
6
5
|
const shared_core_1 = require("@tatumio/shared-core");
|
6
|
+
const shared_abstract_sdk_1 = require("@tatumio/shared-abstract-sdk");
|
7
7
|
const shared_blockchain_abstract_1 = require("@tatumio/shared-blockchain-abstract");
|
8
8
|
const tron_web_1 = require("./services/tron.web");
|
9
9
|
const tron_tx_1 = require("./services/tron.tx");
|
@@ -16,30 +16,22 @@ const TatumTronSDK = (args) => {
|
|
16
16
|
const web = (0, tron_web_1.tronWeb)();
|
17
17
|
const txService = (0, tron_tx_1.tronTx)({ tronWeb: web });
|
18
18
|
const virtualAccount = (0, tron_virtualAccount_1.virtualAccountService)({ blockchain, tronWeb: web });
|
19
|
-
const
|
19
|
+
const abstractSdk = (0, shared_blockchain_abstract_1.abstractBlockchainSdk)(Object.assign(Object.assign({}, args), { blockchain }));
|
20
|
+
const { nft, storage } = (0, shared_abstract_sdk_1.abstractSdkNft)();
|
20
21
|
const { getNFTTransaction, getNFTAccountBalance, getNFTMetadataURI, getNFTRoyalty } = nft;
|
21
22
|
return Object.assign(Object.assign({}, abstractSdk), { transaction: txService.native, trc10: txService.trc10, trc20: txService.trc20, kms: (0, tron_kms_1.tronKmsService)({ blockchain }), nft: Object.assign(Object.assign({}, txService.trc721), { getNFTTransaction,
|
22
23
|
getNFTAccountBalance,
|
23
24
|
getNFTMetadataURI,
|
24
|
-
getNFTRoyalty }), smartContract: txService.smartContract, custodial: txService.custodial, wallet: (0, tron_wallet_1.tronWallet)({ tronWeb: web }), tronWeb: web, record: (0, tron_record_1.tronRecord)(), blockchain: {
|
25
|
+
getNFTRoyalty }), storage, smartContract: txService.smartContract, custodial: txService.custodial, wallet: (0, tron_wallet_1.tronWallet)({ tronWeb: web }), tronWeb: web, record: (0, tron_record_1.tronRecord)(), blockchain: {
|
25
26
|
broadcast: api_client_1.TronService.tronBroadcast,
|
26
27
|
getCurrentBlock: api_client_1.TronService.tronGetCurrentBlock,
|
27
28
|
getBlock: api_client_1.TronService.tronGetBlock,
|
28
29
|
getTrc10Detail: api_client_1.TronService.tronTrc10Detail,
|
29
30
|
getAccount: api_client_1.TronService.tronGetAccount,
|
30
31
|
getTransaction: api_client_1.TronService.tronGetTransaction,
|
31
|
-
sendTransaction: api_client_1.TronService.tronTransfer,
|
32
32
|
smartContractGetAddress: api_client_1.BlockchainUtilsService.scGetContractAddress,
|
33
33
|
getTransactions: api_client_1.TronService.tronAccountTx,
|
34
34
|
getTrc20Transactions: api_client_1.TronService.tronAccountTx20,
|
35
|
-
generateWallet: api_client_1.TronService.generateTronwallet,
|
36
|
-
generateAddress: api_client_1.TronService.tronGenerateAddress,
|
37
|
-
generatePrivateKey: api_client_1.TronService.tronGenerateAddressPrivateKey,
|
38
|
-
createTrc10: api_client_1.TronService.tronCreateTrc10,
|
39
|
-
createTrc20: api_client_1.TronService.tronCreateTrc20,
|
40
|
-
transferTrc10: api_client_1.TronService.tronTransferTrc10,
|
41
|
-
transferTrc20: api_client_1.TronService.tronTransferTrc20,
|
42
|
-
tronFreeze: api_client_1.TronService.tronFreeze,
|
43
35
|
}, virtualAccount });
|
44
36
|
};
|
45
37
|
exports.TatumTronSDK = TatumTronSDK;
|
package/src/lib/tron.sdk.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tron.sdk.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/tron/src/lib/tron.sdk.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"tron.sdk.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/tron/src/lib/tron.sdk.ts"],"names":[],"mappings":";;;AAAA,oDAAyE;AACzE,sDAAiD;AACjD,sEAA2E;AAC3E,oFAA2E;AAC3E,kDAA6C;AAC7C,gDAA2C;AAC3C,wDAAmD;AACnD,wDAAmD;AACnD,kDAAoD;AACpD,wEAAsE;AAEtE,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,cAAc,GAAG,IAAA,2CAAqB,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAA;IAC1E,MAAM,WAAW,GAAG,IAAA,kDAAqB,kCAAM,IAAI,KAAE,UAAU,IAAG,CAAA;IAClE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAA,oCAAc,GAAE,CAAA;IACzC,MAAM,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,aAAa,EAAE,GAAG,GAAG,CAAA;IAEzF,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,iBAAiB;YACjB,oBAAoB;YACpB,iBAAiB;YACjB,aAAa,KAEf,OAAO,EACP,aAAa,EAAE,SAAS,CAAC,aAAa,EACtC,SAAS,EAAE,SAAS,CAAC,SAAS,EAC9B,MAAM,EAAE,IAAA,wBAAU,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EACpC,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,IAAA,wBAAU,GAAE,EACpB,UAAU,EAAE;YACV,SAAS,EAAE,wBAAW,CAAC,aAAa;YACpC,eAAe,EAAE,wBAAW,CAAC,mBAAmB;YAChD,QAAQ,EAAE,wBAAW,CAAC,YAAY;YAClC,cAAc,EAAE,wBAAW,CAAC,eAAe;YAC3C,UAAU,EAAE,wBAAW,CAAC,cAAc;YACtC,cAAc,EAAE,wBAAW,CAAC,kBAAkB;YAC9C,uBAAuB,EAAE,mCAAsB,CAAC,oBAAoB;YACpE,eAAe,EAAE,wBAAW,CAAC,aAAa;YAC1C,oBAAoB,EAAE,wBAAW,CAAC,eAAe;SAClD,EACD,cAAc,IACf;AACH,CAAC,CAAA;AAxCY,QAAA,YAAY,gBAwCxB"}
|