@tatumio/tron 2.0.1-alpha.231
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 +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,127 @@
|
|
1
|
+
import { BurnNftKMSTron as ApiBurnNftKMSTron, BurnNftTron, DeployNftTron, DeployNftTronKMS as ApiDeployNftTronKMS, MintMultipleNftKMSTron as ApiMintMultipleNftKMSTron, MintMultipleNftTron, MintNftKMSTron as ApiMintNftKMSTron, MintNftTron, TransferNftKMSTron as ApiTransferNftKMSTron, TransferNftTron, UpdateCashbackValueForAuthorNftTron, UpdateCashbackValueForAuthorNftKMSTron as ApiUpdateCashbackValueForAuthorNftKMSTron } from '@tatumio/api-client';
|
2
|
+
import { ITronWeb } from './tron.web';
|
3
|
+
declare type DeployNftTronKMS = ApiDeployNftTronKMS & {
|
4
|
+
from: string;
|
5
|
+
};
|
6
|
+
declare type MintNftKMSTron = ApiMintNftKMSTron & {
|
7
|
+
from: string;
|
8
|
+
};
|
9
|
+
declare type TransferNftKMSTron = ApiTransferNftKMSTron & {
|
10
|
+
from: string;
|
11
|
+
};
|
12
|
+
declare type BurnNftKMSTron = ApiBurnNftKMSTron & {
|
13
|
+
from: string;
|
14
|
+
};
|
15
|
+
declare type MintMultipleNftKMSTron = ApiMintMultipleNftKMSTron & {
|
16
|
+
from: string;
|
17
|
+
};
|
18
|
+
declare type UpdateCashbackValueForAuthorNftKMSTron = ApiUpdateCashbackValueForAuthorNftKMSTron & {
|
19
|
+
from: string;
|
20
|
+
};
|
21
|
+
export declare const tronTrc721: (args: {
|
22
|
+
tronWeb: ITronWeb;
|
23
|
+
}) => {
|
24
|
+
prepare: {
|
25
|
+
/**
|
26
|
+
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
27
|
+
* @param body content of the transaction to broadcast
|
28
|
+
* @param provider
|
29
|
+
* @returns transaction data to be broadcast to blockchain.
|
30
|
+
*/
|
31
|
+
deploySignedTransaction: (body: DeployNftTron | DeployNftTronKMS, provider?: string) => Promise<string>;
|
32
|
+
/**
|
33
|
+
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
34
|
+
* @param body content of the transaction to broadcast
|
35
|
+
* @param provider
|
36
|
+
* @returns transaction data to be broadcast to blockchain.
|
37
|
+
*/
|
38
|
+
mintCashbackSignedTransaction: (body: MintNftTron | MintNftKMSTron, provider?: string) => Promise<string>;
|
39
|
+
/**
|
40
|
+
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
41
|
+
* @param body content of the transaction to broadcast
|
42
|
+
* @param provider
|
43
|
+
* @returns transaction data to be broadcast to blockchain.
|
44
|
+
*/
|
45
|
+
mintSignedTransaction: (body: MintNftTron | MintNftKMSTron, provider?: string) => Promise<string>;
|
46
|
+
/**
|
47
|
+
* Sign Tron transfer trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
48
|
+
* @param body content of the transaction to broadcast
|
49
|
+
* @param provider
|
50
|
+
* @returns transaction data to be broadcast to blockchain.
|
51
|
+
*/
|
52
|
+
transferSignedTransaction: (body: TransferNftTron | TransferNftKMSTron, provider?: string) => Promise<string>;
|
53
|
+
/**
|
54
|
+
* Sign Tron burn trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
55
|
+
* @param body content of the transaction to broadcast
|
56
|
+
* @param provider
|
57
|
+
* @returns transaction data to be broadcast to blockchain.
|
58
|
+
*/
|
59
|
+
burnSignedTransaction: (body: BurnNftTron | BurnNftKMSTron, provider?: string) => Promise<string>;
|
60
|
+
/**
|
61
|
+
* Sign Tron mint multiple trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
62
|
+
* @param body content of the transaction to broadcast
|
63
|
+
* @param provider
|
64
|
+
* @returns transaction data to be broadcast to blockchain.
|
65
|
+
*/
|
66
|
+
mintMultipleSignedTransaction: (body: MintMultipleNftTron | MintMultipleNftKMSTron, provider?: string) => Promise<string>;
|
67
|
+
/**
|
68
|
+
* Sign Tron update cashback for author trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
69
|
+
* @param body content of the transaction to broadcast
|
70
|
+
* @param provider
|
71
|
+
* @returns transaction data to be broadcast to blockchain.
|
72
|
+
*/
|
73
|
+
updateCashbackValueForAuthorSignedTransaction: (body: UpdateCashbackValueForAuthorNftTron | UpdateCashbackValueForAuthorNftKMSTron, provider?: string) => Promise<string>;
|
74
|
+
};
|
75
|
+
send: {
|
76
|
+
/**
|
77
|
+
* Send Tron deploy trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
78
|
+
* This operation is irreversible.
|
79
|
+
* @param body content of the transaction to broadcast
|
80
|
+
* @returns transaction id of the transaction in the blockchain
|
81
|
+
*/
|
82
|
+
deploySignedTransaction: (body: DeployNftTron | DeployNftTronKMS, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
83
|
+
/**
|
84
|
+
* Send Tron mint cashback trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
85
|
+
* This operation is irreversible.
|
86
|
+
* @param body content of the transaction to broadcast
|
87
|
+
* @returns transaction id of the transaction in the blockchain
|
88
|
+
*/
|
89
|
+
mintCashbackSignedTransaction: (body: MintNftTron | MintNftKMSTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
90
|
+
/**
|
91
|
+
* Send Tron mint cashback trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
92
|
+
* This operation is irreversible.
|
93
|
+
* @param body content of the transaction to broadcast
|
94
|
+
* @returns transaction id of the transaction in the blockchain
|
95
|
+
*/
|
96
|
+
mintSignedTransaction: (body: MintNftTron | MintNftKMSTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
97
|
+
/**
|
98
|
+
* Send Tron transfer trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
99
|
+
* This operation is irreversible.
|
100
|
+
* @param body content of the transaction to broadcast
|
101
|
+
* @returns transaction id of the transaction in the blockchain
|
102
|
+
*/
|
103
|
+
transferSignedTransaction: (body: TransferNftTron | TransferNftKMSTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
104
|
+
/**
|
105
|
+
* Send Tron burn trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
106
|
+
* This operation is irreversible.
|
107
|
+
* @param body content of the transaction to broadcast
|
108
|
+
* @returns transaction id of the transaction in the blockchain
|
109
|
+
*/
|
110
|
+
burnSignedTransaction: (body: BurnNftTron | BurnNftKMSTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
111
|
+
/**
|
112
|
+
* Send Tron mint multiple trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
113
|
+
* This operation is irreversible.
|
114
|
+
* @param body content of the transaction to broadcast
|
115
|
+
* @returns transaction id of the transaction in the blockchain
|
116
|
+
*/
|
117
|
+
mintMultipleSignedTransaction: (body: MintMultipleNftTron | MintMultipleNftKMSTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
118
|
+
/**
|
119
|
+
* Send Tron update cashback for author trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
120
|
+
* This operation is irreversible.
|
121
|
+
* @param body content of the transaction to broadcast
|
122
|
+
* @returns transaction id of the transaction in the blockchain
|
123
|
+
*/
|
124
|
+
updateCashbackValueForAuthorSignedTransaction: (body: UpdateCashbackValueForAuthorNftTron | UpdateCashbackValueForAuthorNftKMSTron, provider?: string) => Promise<import("@tatumio/api-client").TransactionHash>;
|
125
|
+
};
|
126
|
+
};
|
127
|
+
export {};
|
@@ -0,0 +1,396 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.tronTrc721 = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const api_client_1 = require("@tatumio/api-client");
|
6
|
+
const shared_blockchain_evm_based_1 = require("@tatumio/shared-blockchain-evm-based");
|
7
|
+
const bignumber_js_1 = (0, tslib_1.__importDefault)(require("bignumber.js"));
|
8
|
+
function isDeployNftTronKMS(input) {
|
9
|
+
return input.signatureId !== undefined;
|
10
|
+
}
|
11
|
+
const prepareDeploySignedTransaction = (body, tronWeb, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
12
|
+
const client = tronWeb.getClient(provider);
|
13
|
+
const { name, symbol, feeLimit } = body;
|
14
|
+
const params = {
|
15
|
+
feeLimit: client.toSun(feeLimit),
|
16
|
+
callValue: 0,
|
17
|
+
userFeePercentage: 100,
|
18
|
+
originEnergyLimit: 1,
|
19
|
+
abi: JSON.stringify(shared_blockchain_evm_based_1.Trc721Token.abi),
|
20
|
+
bytecode: shared_blockchain_evm_based_1.Trc721Token.bytecode,
|
21
|
+
parameters: [name, symbol],
|
22
|
+
name,
|
23
|
+
};
|
24
|
+
if (isDeployNftTronKMS(body)) {
|
25
|
+
const tx = yield client.transactionBuilder.createSmartContract(params, body.from);
|
26
|
+
return JSON.stringify(tx);
|
27
|
+
}
|
28
|
+
else {
|
29
|
+
const tx = yield client.transactionBuilder.createSmartContract(params, client.address.fromPrivateKey(body.fromPrivateKey));
|
30
|
+
return JSON.stringify(yield client.trx.sign(tx, body.fromPrivateKey));
|
31
|
+
}
|
32
|
+
});
|
33
|
+
function isMintNftKMSTron(input) {
|
34
|
+
return input.signatureId !== undefined;
|
35
|
+
}
|
36
|
+
const prepareMintCashbackSignedTransaction = (body, tronWeb, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
37
|
+
const { url, to, tokenId, contractAddress, feeLimit, authorAddresses, cashbackValues } = body;
|
38
|
+
const client = tronWeb.getClient(provider);
|
39
|
+
client.setAddress(contractAddress);
|
40
|
+
const contractAddressHex = client.address.toHex(contractAddress);
|
41
|
+
const methodName = 'mintWithCashback(address,uint256,string,address[],uint256[])';
|
42
|
+
const cb = [];
|
43
|
+
if (cashbackValues) {
|
44
|
+
for (const c of cashbackValues) {
|
45
|
+
cb.push(`0x${new bignumber_js_1.default(c).multipliedBy(1e6).toString(16)}`);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
const params = [
|
49
|
+
{ type: 'address', value: client.address.toHex(to) },
|
50
|
+
{
|
51
|
+
type: 'uint256',
|
52
|
+
value: `0x${new bignumber_js_1.default(tokenId).toString(16)}`,
|
53
|
+
},
|
54
|
+
{
|
55
|
+
type: 'string',
|
56
|
+
value: url,
|
57
|
+
},
|
58
|
+
{
|
59
|
+
type: 'address[]',
|
60
|
+
value: authorAddresses === null || authorAddresses === void 0 ? void 0 : authorAddresses.map((a) => client.address.toHex(a)),
|
61
|
+
},
|
62
|
+
{
|
63
|
+
type: 'uint256[]',
|
64
|
+
value: cb,
|
65
|
+
},
|
66
|
+
];
|
67
|
+
if (isMintNftKMSTron(body)) {
|
68
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
69
|
+
feeLimit: client.toSun(feeLimit),
|
70
|
+
from: body.from,
|
71
|
+
}, params, body.from);
|
72
|
+
return JSON.stringify(transaction);
|
73
|
+
}
|
74
|
+
else {
|
75
|
+
const sender = client.address.fromHex(client.address.fromPrivateKey(body.fromPrivateKey));
|
76
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
77
|
+
feeLimit: client.toSun(feeLimit),
|
78
|
+
from: sender,
|
79
|
+
}, params, sender);
|
80
|
+
return JSON.stringify(yield client.trx.sign(transaction, body.fromPrivateKey));
|
81
|
+
}
|
82
|
+
});
|
83
|
+
const prepareMintSignedTransaction = (body, tronWeb, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
84
|
+
const { url, to, tokenId, contractAddress, feeLimit } = body;
|
85
|
+
const client = tronWeb.getClient(provider);
|
86
|
+
client.setAddress(contractAddress);
|
87
|
+
const contractAddressHex = client.address.toHex(contractAddress);
|
88
|
+
const methodName = 'mintWithTokenURI(address,uint256,string)';
|
89
|
+
const params = [
|
90
|
+
{ type: 'address', value: client.address.toHex(to) },
|
91
|
+
{
|
92
|
+
type: 'uint256',
|
93
|
+
value: `0x${new bignumber_js_1.default(tokenId).toString(16)}`,
|
94
|
+
},
|
95
|
+
{
|
96
|
+
type: 'string',
|
97
|
+
value: url,
|
98
|
+
},
|
99
|
+
];
|
100
|
+
if (isMintNftKMSTron(body)) {
|
101
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
102
|
+
feeLimit: client.toSun(feeLimit),
|
103
|
+
from: body.from,
|
104
|
+
}, params, body.from);
|
105
|
+
return JSON.stringify(transaction);
|
106
|
+
}
|
107
|
+
else {
|
108
|
+
const sender = client.address.fromHex(client.address.fromPrivateKey(body.fromPrivateKey));
|
109
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
110
|
+
feeLimit: client.toSun(feeLimit),
|
111
|
+
from: sender,
|
112
|
+
}, params, sender);
|
113
|
+
return JSON.stringify(yield client.trx.sign(transaction, body.fromPrivateKey));
|
114
|
+
}
|
115
|
+
});
|
116
|
+
function isTransferNftKMSTron(input) {
|
117
|
+
return input.signatureId !== undefined;
|
118
|
+
}
|
119
|
+
const transferSignedTransaction = (body, tronWeb, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
120
|
+
const { to, tokenId, contractAddress, feeLimit, value } = body;
|
121
|
+
const client = tronWeb.getClient(provider);
|
122
|
+
const params = [
|
123
|
+
{ type: 'address', value: client.address.toHex(to) },
|
124
|
+
{
|
125
|
+
type: 'uint256',
|
126
|
+
value: `0x${new bignumber_js_1.default(tokenId).toString(16)}`,
|
127
|
+
},
|
128
|
+
];
|
129
|
+
const contractAddressHex = client.address.toHex(contractAddress);
|
130
|
+
const methodName = 'safeTransfer(address,uint256)';
|
131
|
+
client.setAddress(contractAddress);
|
132
|
+
if (isTransferNftKMSTron(body)) {
|
133
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
134
|
+
feeLimit: client.toSun(feeLimit),
|
135
|
+
from: body.from,
|
136
|
+
callValue: value ? `0x${new bignumber_js_1.default(value).multipliedBy(1e6).toString(16)}` : 0,
|
137
|
+
}, params, body.from);
|
138
|
+
return JSON.stringify(transaction);
|
139
|
+
}
|
140
|
+
else {
|
141
|
+
const sender = client.address.fromHex(client.address.fromPrivateKey(body.fromPrivateKey));
|
142
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
143
|
+
feeLimit: client.toSun(feeLimit),
|
144
|
+
from: sender,
|
145
|
+
callValue: value ? `0x${new bignumber_js_1.default(value).multipliedBy(1e6).toString(16)}` : 0,
|
146
|
+
}, params, sender);
|
147
|
+
return JSON.stringify(yield client.trx.sign(transaction, body.fromPrivateKey));
|
148
|
+
}
|
149
|
+
});
|
150
|
+
function isBurnNftKMSTron(input) {
|
151
|
+
return input.signatureId !== undefined;
|
152
|
+
}
|
153
|
+
const burnSignedTransaction = (body, tronWeb, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
154
|
+
const { tokenId, contractAddress, feeLimit } = body;
|
155
|
+
const client = tronWeb.getClient(provider);
|
156
|
+
client.setAddress(contractAddress);
|
157
|
+
const contractAddressHex = client.address.toHex(contractAddress);
|
158
|
+
const methodName = 'burn(uint256)';
|
159
|
+
const params = [
|
160
|
+
{
|
161
|
+
type: 'uint256',
|
162
|
+
value: `0x${new bignumber_js_1.default(tokenId).toString(16)}`,
|
163
|
+
},
|
164
|
+
];
|
165
|
+
if (isBurnNftKMSTron(body)) {
|
166
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
167
|
+
feeLimit: client.toSun(feeLimit),
|
168
|
+
from: body.from,
|
169
|
+
}, params, body.from);
|
170
|
+
return JSON.stringify(transaction);
|
171
|
+
}
|
172
|
+
else {
|
173
|
+
const sender = client.address.fromHex(client.address.fromPrivateKey(body.fromPrivateKey));
|
174
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
175
|
+
feeLimit: client.toSun(feeLimit),
|
176
|
+
from: sender,
|
177
|
+
}, params, sender);
|
178
|
+
return JSON.stringify(yield client.trx.sign(transaction, body.fromPrivateKey));
|
179
|
+
}
|
180
|
+
});
|
181
|
+
function isMintMultipleNftKMSTron(input) {
|
182
|
+
return input.signatureId !== undefined;
|
183
|
+
}
|
184
|
+
const prepareMintMultipleSignedTransaction = (body, tronWeb, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
185
|
+
const { to, tokenId, contractAddress, url, feeLimit } = body;
|
186
|
+
const client = tronWeb.getClient(provider);
|
187
|
+
client.setAddress(contractAddress);
|
188
|
+
const contractAddressHex = client.address.toHex(contractAddress);
|
189
|
+
const methodName = 'mintMultiple(address[],uint256[],string[])';
|
190
|
+
const params = [
|
191
|
+
{
|
192
|
+
type: 'address[]',
|
193
|
+
value: to.map((a) => client.address.toHex(a)),
|
194
|
+
},
|
195
|
+
{
|
196
|
+
type: 'uint256[]',
|
197
|
+
value: tokenId.map((t) => `0x${new bignumber_js_1.default(t).toString(16)}`),
|
198
|
+
},
|
199
|
+
{
|
200
|
+
type: 'string[]',
|
201
|
+
value: url,
|
202
|
+
},
|
203
|
+
];
|
204
|
+
if (isMintMultipleNftKMSTron(body)) {
|
205
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
206
|
+
feeLimit: client.toSun(feeLimit),
|
207
|
+
from: body.from,
|
208
|
+
}, params, body.from);
|
209
|
+
return JSON.stringify(transaction);
|
210
|
+
}
|
211
|
+
else {
|
212
|
+
const sender = client.address.fromHex(client.address.fromPrivateKey(body.fromPrivateKey));
|
213
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
214
|
+
feeLimit: client.toSun(feeLimit),
|
215
|
+
from: sender,
|
216
|
+
}, params, sender);
|
217
|
+
return JSON.stringify(yield client.trx.sign(transaction, body.fromPrivateKey));
|
218
|
+
}
|
219
|
+
});
|
220
|
+
function isUpdateCashbackValueForAuthorNftKMSTron(input) {
|
221
|
+
return input.signatureId !== undefined;
|
222
|
+
}
|
223
|
+
const prepareUpdateCashbackValueForAuthorSignedTransaction = (body, tronWeb, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
224
|
+
const { cashbackValue, tokenId, contractAddress, feeLimit } = body;
|
225
|
+
const client = tronWeb.getClient(provider);
|
226
|
+
client.setAddress(contractAddress);
|
227
|
+
const contractAddressHex = client.address.toHex(contractAddress);
|
228
|
+
const methodName = 'updateCashbackForAuthor(uint256,uint256)';
|
229
|
+
const params = [
|
230
|
+
{
|
231
|
+
type: 'uint256',
|
232
|
+
value: `0x${new bignumber_js_1.default(tokenId).toString(16)}`,
|
233
|
+
},
|
234
|
+
{
|
235
|
+
type: 'uint256',
|
236
|
+
value: `0x${new bignumber_js_1.default(cashbackValue).multipliedBy(1e6).toString(16)}`,
|
237
|
+
},
|
238
|
+
];
|
239
|
+
if (isUpdateCashbackValueForAuthorNftKMSTron(body)) {
|
240
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
241
|
+
feeLimit: client.toSun(feeLimit),
|
242
|
+
from: body.from,
|
243
|
+
}, params, body.from);
|
244
|
+
return JSON.stringify(transaction);
|
245
|
+
}
|
246
|
+
else {
|
247
|
+
const sender = client.address.fromHex(client.address.fromPrivateKey(body.fromPrivateKey));
|
248
|
+
const { transaction } = yield client.transactionBuilder.triggerSmartContract(contractAddressHex, methodName, {
|
249
|
+
feeLimit: client.toSun(feeLimit),
|
250
|
+
from: sender,
|
251
|
+
}, params, sender);
|
252
|
+
return JSON.stringify(yield client.trx.sign(transaction, body.fromPrivateKey));
|
253
|
+
}
|
254
|
+
});
|
255
|
+
const tronTrc721 = (args) => {
|
256
|
+
return {
|
257
|
+
prepare: {
|
258
|
+
/**
|
259
|
+
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
260
|
+
* @param body content of the transaction to broadcast
|
261
|
+
* @param provider
|
262
|
+
* @returns transaction data to be broadcast to blockchain.
|
263
|
+
*/
|
264
|
+
deploySignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { return prepareDeploySignedTransaction(body, args.tronWeb, provider); }),
|
265
|
+
/**
|
266
|
+
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
267
|
+
* @param body content of the transaction to broadcast
|
268
|
+
* @param provider
|
269
|
+
* @returns transaction data to be broadcast to blockchain.
|
270
|
+
*/
|
271
|
+
mintCashbackSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { return prepareMintCashbackSignedTransaction(body, args.tronWeb, provider); }),
|
272
|
+
/**
|
273
|
+
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
274
|
+
* @param body content of the transaction to broadcast
|
275
|
+
* @param provider
|
276
|
+
* @returns transaction data to be broadcast to blockchain.
|
277
|
+
*/
|
278
|
+
mintSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { return prepareMintSignedTransaction(body, args.tronWeb, provider); }),
|
279
|
+
/**
|
280
|
+
* Sign Tron transfer trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
281
|
+
* @param body content of the transaction to broadcast
|
282
|
+
* @param provider
|
283
|
+
* @returns transaction data to be broadcast to blockchain.
|
284
|
+
*/
|
285
|
+
transferSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { return transferSignedTransaction(body, args.tronWeb, provider); }),
|
286
|
+
/**
|
287
|
+
* Sign Tron burn trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
288
|
+
* @param body content of the transaction to broadcast
|
289
|
+
* @param provider
|
290
|
+
* @returns transaction data to be broadcast to blockchain.
|
291
|
+
*/
|
292
|
+
burnSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { return burnSignedTransaction(body, args.tronWeb, provider); }),
|
293
|
+
/**
|
294
|
+
* Sign Tron mint multiple trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
295
|
+
* @param body content of the transaction to broadcast
|
296
|
+
* @param provider
|
297
|
+
* @returns transaction data to be broadcast to blockchain.
|
298
|
+
*/
|
299
|
+
mintMultipleSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { return prepareMintMultipleSignedTransaction(body, args.tronWeb, provider); }),
|
300
|
+
/**
|
301
|
+
* Sign Tron update cashback for author trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
|
302
|
+
* @param body content of the transaction to broadcast
|
303
|
+
* @param provider
|
304
|
+
* @returns transaction data to be broadcast to blockchain.
|
305
|
+
*/
|
306
|
+
updateCashbackValueForAuthorSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { return prepareUpdateCashbackValueForAuthorSignedTransaction(body, args.tronWeb, provider); }),
|
307
|
+
},
|
308
|
+
send: {
|
309
|
+
/**
|
310
|
+
* Send Tron deploy trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
311
|
+
* This operation is irreversible.
|
312
|
+
* @param body content of the transaction to broadcast
|
313
|
+
* @returns transaction id of the transaction in the blockchain
|
314
|
+
*/
|
315
|
+
deploySignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
316
|
+
return api_client_1.BlockchainTronService.tronBroadcast({
|
317
|
+
txData: yield prepareDeploySignedTransaction(body, args.tronWeb, provider),
|
318
|
+
// TODO: SignatureID is missing in OpenApi
|
319
|
+
});
|
320
|
+
}),
|
321
|
+
/**
|
322
|
+
* Send Tron mint cashback trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
323
|
+
* This operation is irreversible.
|
324
|
+
* @param body content of the transaction to broadcast
|
325
|
+
* @returns transaction id of the transaction in the blockchain
|
326
|
+
*/
|
327
|
+
mintCashbackSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
328
|
+
return api_client_1.BlockchainTronService.tronBroadcast({
|
329
|
+
txData: yield prepareMintCashbackSignedTransaction(body, args.tronWeb, provider),
|
330
|
+
// TODO: SignatureID is missing in OpenApi
|
331
|
+
});
|
332
|
+
}),
|
333
|
+
/**
|
334
|
+
* Send Tron mint cashback trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
335
|
+
* This operation is irreversible.
|
336
|
+
* @param body content of the transaction to broadcast
|
337
|
+
* @returns transaction id of the transaction in the blockchain
|
338
|
+
*/
|
339
|
+
mintSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
340
|
+
return api_client_1.BlockchainTronService.tronBroadcast({
|
341
|
+
txData: yield prepareMintSignedTransaction(body, args.tronWeb, provider),
|
342
|
+
// TODO: SignatureID is missing in OpenApi
|
343
|
+
});
|
344
|
+
}),
|
345
|
+
/**
|
346
|
+
* Send Tron transfer trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
347
|
+
* This operation is irreversible.
|
348
|
+
* @param body content of the transaction to broadcast
|
349
|
+
* @returns transaction id of the transaction in the blockchain
|
350
|
+
*/
|
351
|
+
transferSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
352
|
+
return api_client_1.BlockchainTronService.tronBroadcast({
|
353
|
+
txData: yield transferSignedTransaction(body, args.tronWeb, provider),
|
354
|
+
});
|
355
|
+
}),
|
356
|
+
/**
|
357
|
+
* Send Tron burn trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
358
|
+
* This operation is irreversible.
|
359
|
+
* @param body content of the transaction to broadcast
|
360
|
+
* @returns transaction id of the transaction in the blockchain
|
361
|
+
*/
|
362
|
+
burnSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
363
|
+
return api_client_1.BlockchainTronService.tronBroadcast({
|
364
|
+
txData: yield burnSignedTransaction(body, args.tronWeb, provider),
|
365
|
+
// TODO: SignatureID is missing in OpenApi
|
366
|
+
});
|
367
|
+
}),
|
368
|
+
/**
|
369
|
+
* Send Tron mint multiple trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
370
|
+
* This operation is irreversible.
|
371
|
+
* @param body content of the transaction to broadcast
|
372
|
+
* @returns transaction id of the transaction in the blockchain
|
373
|
+
*/
|
374
|
+
mintMultipleSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
375
|
+
return api_client_1.BlockchainTronService.tronBroadcast({
|
376
|
+
txData: yield prepareMintMultipleSignedTransaction(body, args.tronWeb, provider),
|
377
|
+
// TODO: SignatureID is missing in OpenApi
|
378
|
+
});
|
379
|
+
}),
|
380
|
+
/**
|
381
|
+
* Send Tron update cashback for author trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
382
|
+
* This operation is irreversible.
|
383
|
+
* @param body content of the transaction to broadcast
|
384
|
+
* @returns transaction id of the transaction in the blockchain
|
385
|
+
*/
|
386
|
+
updateCashbackValueForAuthorSignedTransaction: (body, provider) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
387
|
+
return api_client_1.BlockchainTronService.tronBroadcast({
|
388
|
+
txData: yield prepareUpdateCashbackValueForAuthorSignedTransaction(body, args.tronWeb, provider),
|
389
|
+
// TODO: SignatureID is missing in OpenApi
|
390
|
+
});
|
391
|
+
}),
|
392
|
+
},
|
393
|
+
};
|
394
|
+
};
|
395
|
+
exports.tronTrc721 = tronTrc721;
|
396
|
+
//# sourceMappingURL=tron.trc721.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tron.trc721.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/tron/src/lib/services/tron.trc721.ts"],"names":[],"mappings":";;;;AAAA,oDAc4B;AAC5B,sFAAkE;AAClE,6EAAoC;AAMpC,SAAS,kBAAkB,CAAC,KAAuC;IACjE,OAAQ,KAA0B,CAAC,WAAW,KAAK,SAAS,CAAA;AAC9D,CAAC;AAED,MAAM,8BAA8B,GAAG,CACrC,IAAsC,EACtC,OAAiB,EACjB,QAAiB,EACjB,EAAE;IACF,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IAE1C,MAAM,EAAE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