Skip to content

Releases: Conflux-Chain/js-conflux-sdk

Release v2.0.0

26 Jan 08:09
ca487c8
Compare
Choose a tag to compare
  • Add support for PoS RPC methods
  • Split RPC methods to it's own namespace, currently include: cfx, pos, trace, txpool
  • Add support for batch RPC
  • Browser export class name change from Conflux to TreeGraph
  • Add method getNextUsableNonce to conflux.advanced, which will first try to use txpool_nextNonce to get a usable nonce, if failed it will fall back to cfx_getNextNonce
  • Add three internal contracts CrossSpaceCall, ConfluxContext, PoSRegister
  • Add one method cfxMappedEVMSpaceAddress to address utility.

trace updates

  • Add a new boolean field valid to indicate whether this trace has change state
  • The internal_transfer_action type trace has added four new field fromPocket, toPocket, fromSpace, toSpace
  • The call and create type trace has added one new field space

For detail explanation of the trace updates check this doc.

Check v2.0 changes for change details

Provider API

  • Add provider.request to make provider compliant with EIP-1193
  • Add a new provider WechatProvider which can be used in Wechat environment

Minor updates

17 Nov 02:52
33cfcb5
Compare
Choose a tag to compare
  1. Add method checkBalanceAgainstTransaction, and estimateGasAndCollateralAdvance to better estimate gas and check balance.
  2. Add the balance key in the result of estimateGasAndCollateralAdvance as the balance of options.from.

Support for conflux-rust v1.1.5's RPC changes

12 Aug 02:37
b40f496
Compare
Choose a tag to compare
Add support for personal_sign. (#136)

* add PersonalMessage to support personal_sign

* update docs about sign methods

* add one method recoverPortalPersonalSign

Co-authored-by: PanaW <[email protected]>

Support new trace fields

26 Apr 07:58
faec50e
Compare
Choose a tag to compare

This version is corresponding to conflux-rust v1.1.3, check it's changelog for detail info.

  • format.address will respect networkId, verbose flag even if the first parameter is an CIP37 address.
  • Add support for standard token contract through Conflux.CRC20
  • cfx_getLogs filter option add one more field offset
  • Add one RPC method cfx_getAccountPendingInfo to get account's transaction pending info
  • epochs pubsub now accept one parameter subscription_epoch the supported values are latest_mined (default) and latest_state
  • Include blockHash, epochHash, epochNumber, transactionHash, and transactionPosition for trace RPCs
  • When abi encoding bytes-N type, if the data's length is not enough, will auto pad (right) to N

Support new CIP37 address

19 Feb 02:26
9be7e51
Compare
Choose a tag to compare
  • Conflux's option can pass networkId now, and add a new method updateNetworkId to sync networkId from RPC.
  • format.address will return new CIP37 addresses, if you pass a hex address, networkId should also be passed as second parameter
  • add new method format.hexAddress to format hex address
  • Wallet's constructor add a parameter networkId
  • PrivateKeyAccount constructor, decrypt, random need one more parameter networkId
  • Transaction, Message sign method need one more parameter networkId
  • Conflux's get methods will return new address, and same to contract method returned address.
  • getSupplyInfo response add new field totalCirculating
  • getStatus response add new field networkId

master

03 Nov 09:33
Compare
Choose a tag to compare
  1. Add wallet to management multiple accounts
  2. Add InternalContrat support
  3. Add websocket provider and pub/sub
  4. Add Drip to better convert between different unit