Skip to content

Releases: Lamden/lamden-js

Tx results via websocket

21 Mar 19:26
636f3da
Compare
Choose a tag to compare

The TxBuilder will not use the block service websocket to check for a transaction result instead of polling.

Updates for Lamden 2.0 networks

08 Sep 20:05
6040a4a
Compare
Choose a tag to compare

#No breaking changes for V1 networks

#Updates for Lamden V2 networks

  • network class args object now accepts a "version" property which tells the lamden-js package that you're going to be communicating with a Lamden V2 network. The only change to the package here is that when transactions are made they do not include the timestamp property in the metadata.

Integrated Blockservice

17 Dec 23:16
fe55268
Compare
Choose a tag to compare

New Features

  • Network Object can now take a list of blockservice addresses
    • networkInfo.blockservice_hosts = Array of host URLS
  • TransactionBuilder can now lookup hash results on the blockservice instead of on the masternode using the new checkBlockserviceForTransactionResult method
    • Instead of checking for a period of time this new checking will check blocks for the existence of the txHash.
      • When you send the tx, the current block is logged
      • Then when you call checkBlockserviceForTransactionResult it starts checking at that block for the next X blocks (default 10, but can be set by changing the maxBlockToCheck property on the transactionBuilder instance you are using )
      • The return result is a mix of the masternode return you usually would expect mixed with block service return info as well. This is for backwards compatibility.
      • Note: the current checkForTransactionResult method will NOT return blockservice data, only the masternode return
      • If checkBlockserviceForTransactionResult is called without any blockservice data or the blockservice is unresponsive it will fail back to checkForTransactionResult
  • Limited blockservice API available on both the network object and the transactionBuilder objects (TransactionBuilder extends network)
    • pingServer
    • getLastetBlock
    • getBlocks
    • getCurrentKeyValue
    • getTransaction
  • New status code of 2, this signifies that the txHash was not able to be located on the Blockchain.
    • status code 0 = successful tx result
    • status code 1 = failed transaction result
    • status code 2 = no result could be found

Breaking changes

  • Possible breaking change if an app is looking for the error "Retry Attmpts 10 hit while checking for Tx Result." as the spelling in "Attempts" was corrected.

Version 3.0

26 Nov 19:44
da74b45
Compare
Choose a tag to compare

Version 3.0.0

New Features

  • Lamen.wallet now has the ability to create BIP 39/32 wallets using new_wallet_bip39

Fixes

  • Lamden-js now works in the browser again. Test cases added to ensure browser compatibility in the future.

Version 2.0!

31 Aug 18:25
Compare
Choose a tag to compare

Version 2 finally!

Features:

Added BIP 32/39 support for creating wallets with mnemonics (word lists) and divination of multiple accounts. Thanks to @shoutcool for this upgrade.

Fixes:

Update dependencies to remove npm security warnings

More verbose error messages from transactionBuilder.send

01 Mar 19:07
Compare
Choose a tag to compare

Possible breaking change if you were relying on "TypeError: Failed to fetch" anywhere in your code to detect errors.

Creating a release because this could have breaking changes.

The Masternode_API send method now checks the response code === 200 and then returns the json information. For all other status codes it attempts to get the statusText and return that as an error.
The transactionBuilder send method had an bug checking if the response as undefined. That has been fixed and now, if the response is undefined, it will return "TypeError: Failed to fetch" like it did before. There is now a change where if response is a string (so NOT the JSON response) it will return that as the error. This string error would be the statusText passed in from the Masternode_API.

Keystore class

19 Feb 22:37
63c2664
Compare
Choose a tag to compare

Added keystore functionality to lamden-js. The same keystore standard used by the wallet (version 1.0).

You can now:

  • Build a keystore by adding keys to an instance
  • Create a keystore from that instance
  • Create a keystore instance from an exiting keystore file and decrypt it
  • Use the keystore to manage wallets, while keeping the keys hidden.

Other additions:

  • wallets.js now has a new method that will create a wallet object. This wallet can be crated by providing an sk or a seed. Asd well, you can specify an option to keep the sk secret via a closure.
  • Created keystore tests and docs.

All lamden-js tests passing

quick fix

18 Dec 16:13
e0e728b
Compare
Choose a tag to compare

Fixed:

  • String floats in lists were not being converted to Fixed objects. ie ["1.1", 2] now gets encoded to [{"__fixed__":"1.1"},2]

Datetime and Timedelta fixes

18 Dec 15:24
4e66829
Compare
Choose a tag to compare

Fixes:
datetime and timedelta where originally sending arrays. This was incorrect as contracting expects them to be time and delta objects respectively.
Encoder has been updated to properly encode these data types. Updated tests cases for encoder to make sure datetime and timedelta are encoded when in lists and objects.

All tests pass.

Current Stable Release

30 Sep 16:54
4019a31
Compare
Choose a tag to compare

This is the current stable release.