Skip to content

Commit d9460de

Browse files
authored
Merge pull request #687 from tronprotocol/release/v6.2.0
Release/v6.2.0
2 parents 15b8f1d + 97bac02 commit d9460de

File tree

18 files changed

+868
-267
lines changed

18 files changed

+868
-267
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.20.2

.nycrc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
{
2-
"exclude": ["src/protocol", "src/types", "lib/commonjs/protocol", "lib/commonjs/src/protocol", "test", "scripts"]
2+
"reporter": ["text", "html"],
3+
"exclude": [
4+
"src/protocol",
5+
"src/types",
6+
"lib/commonjs/protocol",
7+
"lib/commonjs/src/protocol",
8+
"test",
9+
"scripts",
10+
"src/utils/fragments.ts",
11+
"src/utils/interface.ts"
12+
]
313
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
Change Log
22
=========
33

4+
__6.2.0__
5+
6+
## New Features
7+
8+
- **`trx.getNowWitnessList`**
9+
Added a new method to retrieve the witness list with real-time vote counts. This feature is available for JAVA-TRON v4.8.1 and above.
10+
11+
- **New deserialization support**
12+
Added support for deserializing the following transaction types from `raw_data_hex`:
13+
14+
- `TransferAssetContract`
15+
- `ParticipateAssetIssueContract`
16+
- `AssetIssueContract`
17+
- `UpdateAssetContract`
18+
419
__6.1.1__
520

621
## Changes

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default defineConfig([{
3636

3737
rules: {
3838
"no-unused-vars": "off",
39-
"@typescript-eslint/no-unused-vars": "warn",
39+
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
4040
"@typescript-eslint/no-explicit-any": "off",
4141
},
4242
}, {

package-lock.json

Lines changed: 47 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tronweb",
3-
"version": "6.1.1",
3+
"version": "6.2.0",
44
"description": "JavaScript SDK that encapsulates the TRON HTTP API",
55
"main": "./lib/commonjs/index.js",
66
"module": "./lib/esm/index.js",
@@ -20,6 +20,13 @@
2020
"require": "./lib/commonjs/utils/index.js"
2121
}
2222
},
23+
"typesVersions": {
24+
"*": {
25+
"utils": [
26+
"lib/esm/utils/index.d.ts"
27+
]
28+
}
29+
},
2330
"keywords": [
2431
"TRON",
2532
"tronweb"

src/lib/TransactionBuilder/TransactionBuilder.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,6 @@ export class TransactionBuilder {
22932293
if (
22942294
!TronWeb.isAddress(key.address) ||
22952295
!isInteger(key.weight) ||
2296-
key.weight > permissions.threshold ||
22972296
key.weight < 1 ||
22982297
(type === 2 && !permissions.operations)
22992298
) {
@@ -2433,7 +2432,7 @@ export class TransactionBuilder {
24332432
}
24342433
}
24352434

2436-
async alterTransaction(transaction: Transaction, options: AlterTransactionOptions = {}) {
2435+
async alterTransaction<T extends Transaction>(transaction: T, options: AlterTransactionOptions = {}) {
24372436
if (Reflect.has(transaction, 'signature')) throw new Error('You can not extend the expiration of a signed transaction.');
24382437

24392438
if (options.data) {
@@ -2455,11 +2454,11 @@ export class TransactionBuilder {
24552454
return await this.newTxID(transaction, { txLocal: options.txLocal });
24562455
}
24572456

2458-
async extendExpiration(transaction: Transaction, extension: number, options: TxLocal = {}) {
2457+
async extendExpiration<T extends Transaction>(transaction: T, extension: number, options: TxLocal = {}) {
24592458
return await this.alterTransaction(transaction, { extension, txLocal: options?.txLocal });
24602459
}
24612460

2462-
async addUpdateData(transaction: Transaction, data: string, dataFormat: 'utf8' | 'hex' = 'utf8', options: TxLocal = {}) {
2461+
async addUpdateData<T extends Transaction>(transaction: T, data: string, dataFormat: 'utf8' | 'hex' = 'utf8', options: TxLocal = {}) {
24632462
return this.alterTransaction(transaction, { data, dataFormat: dataFormat as string, txLocal: options?.txLocal });
24642463
}
24652464
}

0 commit comments

Comments
 (0)