All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog. and this project adheres to Semantic Versioning.
- moved all core features except clients to
@affidaty/t2-lib-core
package. - default client request timeout changed from 5000ms (5s) to 30000ms (30s)
- BridgeClient autoreconnect feature fixed. use BridgeClient.setAutoReconnect() method.
- BridgeClient can now subscribe separately to block_exec and block_created events
- custom json parser.
- fixed impossible to import keys generated using a secret;
- some errors on Client.txReceipt() and Client.bulkTxReceipt();
- receipts decoding in T2 BC Tool (repo/misc/t2_bc_tool)
- keypairs (and accounts) can now be generated from a secret.
- "build" npm script now also updates .min.js inside
misc/t2_bc_tool
dir
misc
dir added to .eslintignore
- Added support for AES password encryption
- Added bridge client to connect directly to Trinci node via socket and listed for events in real time. Not available in browsers as there's no support for direct socket connections.
- Added TransactionEvent message type.
- general usage data signature creation/verification functions added to main export.
- Transaction schema management
- T2 Blockchain Tool added to repository. (
/misc/t2_bc_tool
) - Client.getNodeInfo() method (node version 0.2.8+)
- elliptic curve point compression/decompression is now supported (only secp384r1 for now)
- added IEEE P1363 => ASN.1 signature conversion function
- Added AbortController and timeout support to t2lib.Client
- generic Transaction class is now able to determine the exact verification logic based on transaction tag.
- bulk root transaction schema now automatically changed to empty bulk root schema when necessary
- added "Core" export to lib
- base58 library used for conversions changed
- default client network is now '' (empty string)
- data requested from an account are now returned as Uint8Array
- block index can now be passed to Client.blockData() as a hex string to fix JS number limitations for big UInt64 numbers
- certificate verification bug fixed
- fixed fome unwanted overrides of the base class methods by child classes
- fixed bulk receipt format
- AES key management.
- Exported transactions import/export interfaces.
- Reintroduced t2lib.Utils.getSaltAndIV(); method.
- Transaction schema members now contain actual schema hashes.
- ECDHKeyPair()/ECDSAKeyPair() constructors now accept custom parameters. If no params were provided, defaults are used.
- Schema files for various transaction types.
- Added maxFuel parameter to
prepareUnsignedTx()
,prepareTx()
andprepareAndSubmitTx()
client methods, which should've been done in2.0.0
.
- event data member name changed from
event_data
toeventData
inside receipt's events to respect project's casing rules. - Transaction's accessors have now been moved to transaction's data member, which now is a separate class. So to access transaction's data members you need to use
tx.data.accountId()
instead oftx.accountId()
. - Old
Transaction
class is now called UnitaryTransaction. Use specific transaction classes (Bulk, BulkNode, BulkRoot, Unitary) to create transaction of the desired type. GenericTransaction
class can be used to parse/verify avery other transaction type.
- added
Transaction.getTicket()
method, which computes transaction ticket without submitting it to the blockchain. - added
client.waitForBulkTicket()
andclient.bulkTxReceipt()
methods. However bulk transactions can be managed with oldclient.waitForTicket()
andclient.txReceipt()
methods. - added
client.getBlockchainSettings()
method which can get some settings (not yet network name). - added
Bulk Root
,Bulk Node
, andBulk
transactions classes. - added
schema
field to signable (and, therefore, to transactions, certificates and delegations).
- removed client.registeredAssetsList() method as it cannot be used anymore.
- List of events fired by smart contract added to transaction receipt.
- License changed.
- License, changelog and readme files added to npm package.
- Nothing. 1.6.0 was published again on NPM as 1.6.1 by mistake. Now to publish the new code on NPM we need to increment the version again, even if nothing has actually changed.
- Added ecdsa_secp256r1 keys default parameters (
t2lib.CryptoDefaults.ECDSAP256R1KeyPairParams
)
schema
andmaxFuel
fields added to transactions (not compatible with core versions prior to 0.2.3-rc1).burnedFuel
field added to trancsaction receipt (not compatible with core versions prior to 0.2.3-rc1).
- Certificate.multiProof setter fixed.
- Fixed multiproof getting added even if certificate.create() is being called with no args or all the fields
- Added
t2lib.Utils.sha256()
function to calculate sha256 hash of given data. - Added 'target' member to certificates. it's the ID of the account whose data are getting certified.
- Added delegations.
- client.accountData() now also accepts a list of data keys.
- Fixed issue where subsequent calls to account.generate() didn't properly clear the previous value therefore didn't produce a valid signature.
- Changed library used for sha256 generation in certificates. Certificates created with previous versions cannot be verified successfully by this version and vice versa.