@tatumio/tron 2.0.1-alpha.231
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +28 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/lib/services/tron.custodial.d.ts +59 -0
- package/src/lib/services/tron.custodial.js +131 -0
- package/src/lib/services/tron.custodial.js.map +1 -0
- package/src/lib/services/tron.record.d.ts +17 -0
- package/src/lib/services/tron.record.js +24 -0
- package/src/lib/services/tron.record.js.map +1 -0
- package/src/lib/services/tron.trc10.d.ts +39 -0
- package/src/lib/services/tron.trc10.js +105 -0
- package/src/lib/services/tron.trc10.js.map +1 -0
- package/src/lib/services/tron.trc20.d.ts +45 -0
- package/src/lib/services/tron.trc20.js +133 -0
- package/src/lib/services/tron.trc20.js.map +1 -0
- package/src/lib/services/tron.trc721.d.ts +127 -0
- package/src/lib/services/tron.trc721.js +396 -0
- package/src/lib/services/tron.trc721.js.map +1 -0
- package/src/lib/services/tron.tx.d.ts +150 -0
- package/src/lib/services/tron.tx.js +236 -0
- package/src/lib/services/tron.tx.js.map +1 -0
- package/src/lib/services/tron.utils.d.ts +1 -0
- package/src/lib/services/tron.utils.js +82 -0
- package/src/lib/services/tron.utils.js.map +1 -0
- package/src/lib/services/tron.wallet.d.ts +49 -0
- package/src/lib/services/tron.wallet.js +76 -0
- package/src/lib/services/tron.wallet.js.map +1 -0
- package/src/lib/services/tron.web.d.ts +5 -0
- package/src/lib/services/tron.web.js +27 -0
- package/src/lib/services/tron.web.js.map +1 -0
- package/src/lib/tron.sdk.d.ts +230 -0
- package/src/lib/tron.sdk.js +25 -0
- package/src/lib/tron.sdk.js.map +1 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.tronWeb = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const api_client_1 = require("@tatumio/api-client");
|
6
|
+
// tronweb lib dont have any typings (not even in @types)
|
7
|
+
// @ts-ignore
|
8
|
+
const tronweb_1 = (0, tslib_1.__importDefault)(require("tronweb"));
|
9
|
+
const tronWeb = () => {
|
10
|
+
return {
|
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;
|
14
|
+
const HttpProvider = tronweb_1.default.providers.HttpProvider;
|
15
|
+
const fullNode = new HttpProvider(endpoint);
|
16
|
+
const solidityNode = new HttpProvider(endpoint);
|
17
|
+
const eventServer = new HttpProvider(endpoint);
|
18
|
+
const tronWebInstace = new tronweb_1.default(fullNode, solidityNode, eventServer);
|
19
|
+
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
|
+
});
|
22
|
+
return tronWebInstace;
|
23
|
+
},
|
24
|
+
};
|
25
|
+
};
|
26
|
+
exports.tronWeb = tronWeb;
|
27
|
+
//# sourceMappingURL=tron.web.js.map
|
@@ -0,0 +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,mEAA6B;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,CAAA;YAEvE,cAAc,CAAC,SAAS,CAAC;gBACvB,kBAAkB,EAAE,MAAA,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,mCAAI,gCAAmB,CAAC,gBAAgB;aAC5F,CAAC,CAAA;YAEF,OAAO,cAAc,CAAA;QACvB,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AApBY,QAAA,OAAO,WAoBnB"}
|
@@ -0,0 +1,230 @@
|
|
1
|
+
import { BlockchainTronService } from '@tatumio/api-client';
|
2
|
+
import { SDKArguments } from '@tatumio/shared-abstract-sdk';
|
3
|
+
export declare const TatumTronSDK: (args: SDKArguments) => {
|
4
|
+
transaction: {
|
5
|
+
trc10: {
|
6
|
+
prepare: {
|
7
|
+
signedTransaction: (body: import("@tatumio/api-client").TransferTronTrc10Blockchain | import("@tatumio/api-client").TransferTronTrc10BlockchainKMS, precision?: number, provider?: string) => Promise<string>;
|
8
|
+
createSignedTransaction: (body: import("@tatumio/api-client").CreateTronTrc10Blockchain | import("@tatumio/api-client").CreateTronTrc10BlockchainKMS, provider?: string) => Promise<string>;
|
9
|
+
};
|
10
|
+
send: {
|
11
|
+
signedTransaction: (body: import("@tatumio/api-client").TransferTronTrc10Blockchain | import("@tatumio/api-client").TransferTronTrc10BlockchainKMS, precision?: number, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
12
|
+
createSignedTransaction: (body: import("@tatumio/api-client").CreateTronTrc10Blockchain | import("@tatumio/api-client").CreateTronTrc10BlockchainKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
trc20: {
|
16
|
+
getAccountTrc20Address: (address: string, contractAddress: string, provider?: string) => Promise<any>;
|
17
|
+
getTrc20ContractDecimals: (contractAddress: string, provider?: string) => Promise<any>;
|
18
|
+
prepare: {
|
19
|
+
signedTransaction: (body: import("@tatumio/api-client").TransferTronTrc20Blockchain | import("@tatumio/api-client").TransferTronTrc20BlockchainKMS, provider?: string) => Promise<string>;
|
20
|
+
createSignedTransaction: (body: import("@tatumio/api-client").CreateTronTrc20Blockchain | import("@tatumio/api-client").CreateTronTrc20BlockchainKMS, provider?: string) => Promise<string>;
|
21
|
+
};
|
22
|
+
send: {
|
23
|
+
signedTransaction: (body: import("@tatumio/api-client").TransferTronTrc20Blockchain | import("@tatumio/api-client").TransferTronTrc20BlockchainKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
24
|
+
createSignedTransaction: (body: import("@tatumio/api-client").CreateTronTrc20Blockchain | import("@tatumio/api-client").CreateTronTrc20BlockchainKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
trc721: {
|
28
|
+
prepare: {
|
29
|
+
deploySignedTransaction: (body: (import("@tatumio/api-client").DeployNftTronKMS & {
|
30
|
+
from: string;
|
31
|
+
}) | import("@tatumio/api-client").DeployNftTron, provider?: string) => Promise<string>;
|
32
|
+
mintCashbackSignedTransaction: (body: (import("@tatumio/api-client").MintNftKMSTron & {
|
33
|
+
from: string;
|
34
|
+
}) | import("@tatumio/api-client").MintNftTron, provider?: string) => Promise<string>;
|
35
|
+
mintSignedTransaction: (body: (import("@tatumio/api-client").MintNftKMSTron & {
|
36
|
+
from: string;
|
37
|
+
}) | import("@tatumio/api-client").MintNftTron, provider?: string) => Promise<string>;
|
38
|
+
transferSignedTransaction: (body: (import("@tatumio/api-client").TransferNftKMSTron & {
|
39
|
+
from: string;
|
40
|
+
}) | import("@tatumio/api-client").TransferNftTron, provider?: string) => Promise<string>;
|
41
|
+
burnSignedTransaction: (body: (import("@tatumio/api-client").BurnNftKMSTron & {
|
42
|
+
from: string;
|
43
|
+
}) | import("@tatumio/api-client").BurnNftTron, provider?: string) => Promise<string>;
|
44
|
+
mintMultipleSignedTransaction: (body: (import("@tatumio/api-client").MintMultipleNftKMSTron & {
|
45
|
+
from: string;
|
46
|
+
}) | import("@tatumio/api-client").MintMultipleNftTron, provider?: string) => Promise<string>;
|
47
|
+
updateCashbackValueForAuthorSignedTransaction: (body: (import("@tatumio/api-client").UpdateCashbackValueForAuthorNftKMSTron & {
|
48
|
+
from: string;
|
49
|
+
}) | import("@tatumio/api-client").UpdateCashbackValueForAuthorNftTron, provider?: string) => Promise<string>;
|
50
|
+
};
|
51
|
+
send: {
|
52
|
+
deploySignedTransaction: (body: (import("@tatumio/api-client").DeployNftTronKMS & {
|
53
|
+
from: string;
|
54
|
+
}) | import("@tatumio/api-client").DeployNftTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
55
|
+
mintCashbackSignedTransaction: (body: (import("@tatumio/api-client").MintNftKMSTron & {
|
56
|
+
from: string;
|
57
|
+
}) | import("@tatumio/api-client").MintNftTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
58
|
+
mintSignedTransaction: (body: (import("@tatumio/api-client").MintNftKMSTron & {
|
59
|
+
from: string;
|
60
|
+
}) | import("@tatumio/api-client").MintNftTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
61
|
+
transferSignedTransaction: (body: (import("@tatumio/api-client").TransferNftKMSTron & {
|
62
|
+
from: string;
|
63
|
+
}) | import("@tatumio/api-client").TransferNftTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
64
|
+
burnSignedTransaction: (body: (import("@tatumio/api-client").BurnNftKMSTron & {
|
65
|
+
from: string;
|
66
|
+
}) | import("@tatumio/api-client").BurnNftTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
67
|
+
mintMultipleSignedTransaction: (body: (import("@tatumio/api-client").MintMultipleNftKMSTron & {
|
68
|
+
from: string;
|
69
|
+
}) | import("@tatumio/api-client").MintMultipleNftTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
70
|
+
updateCashbackValueForAuthorSignedTransaction: (body: (import("@tatumio/api-client").UpdateCashbackValueForAuthorNftKMSTron & {
|
71
|
+
from: string;
|
72
|
+
}) | import("@tatumio/api-client").UpdateCashbackValueForAuthorNftTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
prepare: {
|
76
|
+
signedTransaction: (body: import("@tatumio/api-client").TransferTronBlockchain | import("@tatumio/api-client").TransferTronBlockchainKMS, provider?: string) => Promise<string>;
|
77
|
+
freezeTransaction: (body: import("@tatumio/api-client").FreezeTron | import("@tatumio/api-client").FreezeTronKMS, provider?: string) => Promise<string>;
|
78
|
+
smartContractInvocation: (body: import("@tatumio/api-client").CallSmartContractMethod | import("@tatumio/api-client").CallSmartContractMethodKMS, provider?: string) => Promise<string>;
|
79
|
+
custodialTransferBatch: (body: import("@tatumio/api-client").CallSmartContractMethod | import("@tatumio/api-client").CallSmartContractMethodKMS, provider?: string) => Promise<string>;
|
80
|
+
generateCustodialWalletSignedTransaction: (body: import("@tatumio/api-client").GenerateCustodialWalletTron | import("@tatumio/api-client").GenerateCustodialWalletTronKMS, provider?: string) => Promise<string>;
|
81
|
+
deployMarketplaceListingSignedTransaction: (body: import("@tatumio/api-client").GenerateMarketplaceTron | import("@tatumio/api-client").GenerateMarketplaceTronKMS, tronWeb: import("./services/tron.web").ITronWeb, provider?: string) => Promise<string>;
|
82
|
+
};
|
83
|
+
send: {
|
84
|
+
signedTransaction: (body: import("@tatumio/api-client").TransferTronBlockchain | import("@tatumio/api-client").TransferTronBlockchainKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
85
|
+
freezeTransaction: (body: import("@tatumio/api-client").FreezeTron | import("@tatumio/api-client").FreezeTronKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
86
|
+
generateCustodialWalletSignedTransaction: (body: import("@tatumio/api-client").GenerateCustodialWalletTron | import("@tatumio/api-client").GenerateCustodialWalletTronKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
87
|
+
deployMarketplaceListingSignedTransaction: (body: import("@tatumio/api-client").GenerateMarketplaceTron | import("@tatumio/api-client").GenerateMarketplaceTronKMS, tronWeb: import("./services/tron.web").ITronWeb, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
88
|
+
};
|
89
|
+
};
|
90
|
+
wallet: {
|
91
|
+
generateBlockchainWallet: (mnem: string) => Promise<import("@tatumio/api-client").TronWallet>;
|
92
|
+
generateWallet(mnemonic?: string): Promise<import("@tatumio/api-client").TronWallet>;
|
93
|
+
generateAddressFromXPub(xpub: string, i: number): string;
|
94
|
+
generatePrivateKeyFromMnemonic(mnemonic: string, i: number): Promise<string>;
|
95
|
+
generateAddressFromPrivatekey(privateKey: string): string;
|
96
|
+
custodial: {
|
97
|
+
prepare: {
|
98
|
+
custodialWallet: (body: import("@tatumio/api-client").GenerateCustodialWalletTron | import("@tatumio/api-client").GenerateCustodialWalletTronKMS, provider?: string) => Promise<string>;
|
99
|
+
transferFromCustodialWallet: (body: import("@tatumio/api-client").TransferCustodialWalletTron | import("@tatumio/api-client").TransferCustodialWalletTronKMS, getContractDecimals: (contractAddress: string, provider?: string, testnet?: boolean) => Promise<number>, provider?: string, decimals?: number, testnet?: boolean) => Promise<string>;
|
100
|
+
batchTransferFromCustodialWallet: (body: import("@tatumio/api-client").TransferCustodialWalletBatchTron | import("@tatumio/api-client").TransferCustodialWalletBatchTronKMS, getContractDecimals: (contractAddress: string, provider?: string, testnet?: boolean) => Promise<number>, provider?: string, decimals?: number, testnet?: boolean) => Promise<string>;
|
101
|
+
};
|
102
|
+
send: {
|
103
|
+
custodialWallet: (body: import("@tatumio/api-client").GenerateCustodialWalletTron | import("@tatumio/api-client").GenerateCustodialWalletTronKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
104
|
+
transferFromCustodialWallet: (body: import("@tatumio/api-client").TransferCustodialWalletTron | import("@tatumio/api-client").TransferCustodialWalletTronKMS, getContractDecimals: (contractAddress: string, provider?: string, testnet?: boolean) => Promise<number>, provider?: string, decimals?: number, testnet?: boolean) => Promise<import("@tatumio/api-client").TransactionHash>;
|
105
|
+
batchTransferFromCustodialWallet: (body: import("@tatumio/api-client").TransferCustodialWalletBatchTron | import("@tatumio/api-client").TransferCustodialWalletBatchTronKMS, getContractDecimals: (contractAddress: string, provider?: string, testnet?: boolean) => Promise<number>, provider?: string, decimals?: number, testnet?: boolean) => Promise<import("@tatumio/api-client").TransactionHash>;
|
106
|
+
};
|
107
|
+
};
|
108
|
+
};
|
109
|
+
tronWeb: import("./services/tron.web").ITronWeb;
|
110
|
+
record: {
|
111
|
+
getLog(id: string): import("@tatumio/api-client").CancelablePromise<{
|
112
|
+
data: string;
|
113
|
+
}>;
|
114
|
+
};
|
115
|
+
blockchain: {
|
116
|
+
broadcast: typeof BlockchainTronService.tronBroadcast;
|
117
|
+
getCurrentBlock: typeof BlockchainTronService.tronGetCurrentBlock;
|
118
|
+
getBlock: typeof BlockchainTronService.tronGetBlock;
|
119
|
+
getTrc10Detail: typeof BlockchainTronService.tronTrc10Detail;
|
120
|
+
getAccount: typeof BlockchainTronService.tronGetAccount;
|
121
|
+
getTransaction: typeof BlockchainTronService.tronGetTransaction;
|
122
|
+
sendTransaction: typeof BlockchainTronService.tronTransfer;
|
123
|
+
};
|
124
|
+
kms: {
|
125
|
+
getAllPending(signatures?: string): import("@tatumio/api-client").CancelablePromise<import("@tatumio/api-client").PendingTransaction>;
|
126
|
+
get: typeof import("@tatumio/api-client").SecurityKeyManagementSystemService.getPendingTransactionToSign;
|
127
|
+
complete: typeof import("@tatumio/api-client").SecurityKeyManagementSystemService.completePendingSignature;
|
128
|
+
delete: typeof import("@tatumio/api-client").SecurityKeyManagementSystemService.deletePendingTransactionToSign;
|
129
|
+
};
|
130
|
+
offchain: {
|
131
|
+
depositAddress: {
|
132
|
+
checkExists: (address: string, index?: number) => Promise<import("@tatumio/api-client").Account>;
|
133
|
+
create: typeof import("@tatumio/api-client").OffChainAccountService.generateDepositAddress;
|
134
|
+
createMultiple: typeof import("@tatumio/api-client").OffChainAccountService.generateDepositAddressesBatch;
|
135
|
+
assign: typeof import("@tatumio/api-client").OffChainAccountService.assignAddress;
|
136
|
+
remove: typeof import("@tatumio/api-client").OffChainAccountService.removeAddress;
|
137
|
+
getByAccount: typeof import("@tatumio/api-client").OffChainAccountService.getAllDepositAddresses;
|
138
|
+
};
|
139
|
+
withdrawal: {
|
140
|
+
getAll: (status?: "InProgress" | "Done" | "Cancelled", pageSize?: number, offset?: number) => Promise<import("@tatumio/api-client").WithdrawalObject[]>;
|
141
|
+
broadcast: typeof import("@tatumio/api-client").OffChainWithdrawalService.broadcastBlockchainTransaction;
|
142
|
+
create: typeof import("@tatumio/api-client").OffChainWithdrawalService.storeWithdrawal;
|
143
|
+
complete: typeof import("@tatumio/api-client").OffChainWithdrawalService.completeWithdrawal;
|
144
|
+
};
|
145
|
+
storeTokenAddress: typeof import("@tatumio/api-client").OffChainBlockchainService.storeTokenAddress;
|
146
|
+
};
|
147
|
+
getExchangeRate(basePair?: import("@tatumio/api-client").Fiat): import("@tatumio/api-client").CancelablePromise<import("@tatumio/api-client").ExchangeRate>;
|
148
|
+
storage: {
|
149
|
+
upload: typeof import("@tatumio/api-client").StorageIpfsService.storeIpfs;
|
150
|
+
get: typeof import("@tatumio/api-client").StorageIpfsService.getIpfsData;
|
151
|
+
};
|
152
|
+
subscriptions: typeof import("@tatumio/api-client").LedgerSubscriptionService;
|
153
|
+
ledger: {
|
154
|
+
customer: {
|
155
|
+
get: typeof import("@tatumio/api-client").LedgerCustomerService.getCustomerByExternalOrInternalId;
|
156
|
+
getAll: typeof import("@tatumio/api-client").LedgerCustomerService.findAllCustomers;
|
157
|
+
update: typeof import("@tatumio/api-client").LedgerCustomerService.updateCustomer;
|
158
|
+
activate: typeof import("@tatumio/api-client").LedgerCustomerService.activateCustomer;
|
159
|
+
deactivate: typeof import("@tatumio/api-client").LedgerCustomerService.deactivateCustomer;
|
160
|
+
enable: typeof import("@tatumio/api-client").LedgerCustomerService.enableCustomer;
|
161
|
+
disable: typeof import("@tatumio/api-client").LedgerCustomerService.disableCustomer;
|
162
|
+
};
|
163
|
+
orderBook: {
|
164
|
+
getHistorical: typeof import("@tatumio/api-client").LedgerOrderBookService.getHistoricalTradesBody;
|
165
|
+
getActiveBuyTrades: typeof import("@tatumio/api-client").LedgerOrderBookService.getBuyTradesBody;
|
166
|
+
getActiveSellTrades: typeof import("@tatumio/api-client").LedgerOrderBookService.getBuyTradesBody;
|
167
|
+
newTrade: typeof import("@tatumio/api-client").LedgerOrderBookService.storeTrade;
|
168
|
+
get: typeof import("@tatumio/api-client").LedgerOrderBookService.getTradeById;
|
169
|
+
cancel: typeof import("@tatumio/api-client").LedgerOrderBookService.deleteTrade;
|
170
|
+
cancelByAccount: typeof import("@tatumio/api-client").LedgerOrderBookService.deleteAccountTrades;
|
171
|
+
};
|
172
|
+
transaction: {
|
173
|
+
send: typeof import("@tatumio/api-client").LedgerTransactionService.sendTransaction;
|
174
|
+
sendMultiple: typeof import("@tatumio/api-client").LedgerTransactionService.sendTransactionBatch;
|
175
|
+
getAll: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactions;
|
176
|
+
getAllByAccount: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactionsByAccountId;
|
177
|
+
getAllByCustomer: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactionsByCustomerId;
|
178
|
+
getAllByReference: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactionsByReference;
|
179
|
+
countByAccount: (filter: import("@tatumio/api-client").TransactionFilter) => any;
|
180
|
+
countByCustomer: (filter: import("@tatumio/api-client").TransactionFilterCustomer) => any;
|
181
|
+
};
|
182
|
+
virtualCurrency: {
|
183
|
+
create: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.createCurrency;
|
184
|
+
mint: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.mintCurrency;
|
185
|
+
revoke: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.revokeCurrency;
|
186
|
+
getByName: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.getCurrency;
|
187
|
+
update: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.updateCurrency;
|
188
|
+
};
|
189
|
+
blockAmount: {
|
190
|
+
block: typeof import("@tatumio/api-client").LedgerAccountService.blockAmount;
|
191
|
+
unblock: typeof import("@tatumio/api-client").LedgerAccountService.deleteBlockAmount;
|
192
|
+
unblockWithTransaction: typeof import("@tatumio/api-client").LedgerAccountService.unblockAmountWithTransaction;
|
193
|
+
};
|
194
|
+
account: {
|
195
|
+
get: typeof import("@tatumio/api-client").LedgerAccountService.getAccountByAccountId;
|
196
|
+
getAll: typeof import("@tatumio/api-client").LedgerAccountService.getAllAccounts;
|
197
|
+
getByCustomerId: typeof import("@tatumio/api-client").LedgerAccountService.getAccountsByCustomerId;
|
198
|
+
getBalance: typeof import("@tatumio/api-client").LedgerAccountService.getAccountBalance;
|
199
|
+
create: typeof import("@tatumio/api-client").LedgerAccountService.createAccount;
|
200
|
+
createMultiple: typeof import("@tatumio/api-client").LedgerAccountService.createAccountBatch;
|
201
|
+
update: typeof import("@tatumio/api-client").LedgerAccountService.updateAccountByAccountId;
|
202
|
+
getBlockedAmountsByAccountId: typeof import("@tatumio/api-client").LedgerAccountService.getBlockAmountById;
|
203
|
+
activate: typeof import("@tatumio/api-client").LedgerAccountService.activateAccount;
|
204
|
+
deactivate: typeof import("@tatumio/api-client").LedgerAccountService.deactivateAccount;
|
205
|
+
freeze: typeof import("@tatumio/api-client").LedgerAccountService.freezeAccount;
|
206
|
+
unfreeze: typeof import("@tatumio/api-client").LedgerAccountService.unfreezeAccount;
|
207
|
+
generate: (account: import("@tatumio/api-client").CreateAccount, generateNewWalletFn: any, generateNewWallet?: boolean, testnet?: boolean, webhookUrl?: string) => Promise<any>;
|
208
|
+
};
|
209
|
+
};
|
210
|
+
security: {
|
211
|
+
checkMaliciousAddress: typeof import("@tatumio/api-client").SecurityAddressService.checkMalicousAddress;
|
212
|
+
};
|
213
|
+
tatum: {
|
214
|
+
getCredits: typeof import("@tatumio/api-client").TatumServiceService.getCredits;
|
215
|
+
getVersion: typeof import("@tatumio/api-client").TatumServiceService.getVersion;
|
216
|
+
freezeApiKey: typeof import("@tatumio/api-client").TatumServiceService.freezeApiKey;
|
217
|
+
unfreezeApiKey: typeof import("@tatumio/api-client").TatumServiceService.unfreezeApiKey;
|
218
|
+
};
|
219
|
+
nft: {
|
220
|
+
mintNFT: typeof import("@tatumio/api-client").BlockchainNftService.nftMintErc721;
|
221
|
+
getNFTTransaction: typeof import("@tatumio/api-client").BlockchainNftService.nftGetTransactErc721;
|
222
|
+
getNFTTransactionsByToken: typeof import("@tatumio/api-client").BlockchainNftService.nftGetTransactionByToken;
|
223
|
+
getNFTTransactionsByAddress: typeof import("@tatumio/api-client").BlockchainNftService.nftGetTransactionByAddress;
|
224
|
+
getNFTsByAddress: typeof import("@tatumio/api-client").BlockchainNftService.nftGetBalanceErc721;
|
225
|
+
getNFTProvenanceData: typeof import("@tatumio/api-client").BlockchainNftService.nftGetProvenanceDataErc721;
|
226
|
+
getNFTMetadataURI: typeof import("@tatumio/api-client").BlockchainNftService.nftGetMetadataErc721;
|
227
|
+
getNFTRoyalty: typeof import("@tatumio/api-client").BlockchainNftService.nftGetRoyaltyErc721;
|
228
|
+
prepareAddNFTMinterAbstraction: typeof import("@tatumio/api-client").BlockchainNftService.nftGetRoyaltyErc721;
|
229
|
+
};
|
230
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TatumTronSDK = void 0;
|
4
|
+
const api_client_1 = require("@tatumio/api-client");
|
5
|
+
const shared_core_1 = require("@tatumio/shared-core");
|
6
|
+
const shared_blockchain_abstract_1 = require("@tatumio/shared-blockchain-abstract");
|
7
|
+
const tron_web_1 = require("./services/tron.web");
|
8
|
+
const tron_tx_1 = require("./services/tron.tx");
|
9
|
+
const tron_wallet_1 = require("./services/tron.wallet");
|
10
|
+
const tron_record_1 = require("./services/tron.record");
|
11
|
+
const blockchain = shared_core_1.Blockchain.TRON;
|
12
|
+
const TatumTronSDK = (args) => {
|
13
|
+
const web = (0, tron_web_1.tronWeb)();
|
14
|
+
return Object.assign(Object.assign({}, (0, shared_blockchain_abstract_1.abstractBlockchainSdk)(Object.assign(Object.assign({}, args), { blockchain }))), { transaction: (0, tron_tx_1.tronTx)({ tronWeb: web }), wallet: (0, tron_wallet_1.tronWallet)({ tronWeb: web }), tronWeb: web, record: (0, tron_record_1.tronRecord)(), blockchain: {
|
15
|
+
broadcast: api_client_1.BlockchainTronService.tronBroadcast,
|
16
|
+
getCurrentBlock: api_client_1.BlockchainTronService.tronGetCurrentBlock,
|
17
|
+
getBlock: api_client_1.BlockchainTronService.tronGetBlock,
|
18
|
+
getTrc10Detail: api_client_1.BlockchainTronService.tronTrc10Detail,
|
19
|
+
getAccount: api_client_1.BlockchainTronService.tronGetAccount,
|
20
|
+
getTransaction: api_client_1.BlockchainTronService.tronGetTransaction,
|
21
|
+
sendTransaction: api_client_1.BlockchainTronService.tronTransfer,
|
22
|
+
} });
|
23
|
+
};
|
24
|
+
exports.TatumTronSDK = TatumTronSDK;
|
25
|
+
//# sourceMappingURL=tron.sdk.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tron.sdk.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/tron/src/lib/tron.sdk.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,sDAAiD;AAEjD,oFAA2E;AAC3E,kDAA6C;AAC7C,gDAA2C;AAC3C,wDAAmD;AACnD,wDAAmD;AAEnD,MAAM,UAAU,GAAG,wBAAU,CAAC,IAAI,CAAA;AAE3B,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAE,EAAE;IACjD,MAAM,GAAG,GAAG,IAAA,kBAAO,GAAE,CAAA;IAErB,uCACK,IAAA,kDAAqB,kCACnB,IAAI,KACP,UAAU,IACV,KACF,WAAW,EAAE,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EACrC,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,kCAAqB,CAAC,aAAa;YAC9C,eAAe,EAAE,kCAAqB,CAAC,mBAAmB;YAC1D,QAAQ,EAAE,kCAAqB,CAAC,YAAY;YAC5C,cAAc,EAAE,kCAAqB,CAAC,eAAe;YACrD,UAAU,EAAE,kCAAqB,CAAC,cAAc;YAChD,cAAc,EAAE,kCAAqB,CAAC,kBAAkB;YACxD,eAAe,EAAE,kCAAqB,CAAC,YAAY;SACpD,IACF;AACH,CAAC,CAAA;AAtBY,QAAA,YAAY,gBAsBxB"}
|