Releases: Conflux-Chain/js-conflux-sdk
Releases · Conflux-Chain/js-conflux-sdk
Release v2.0.0
- 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
toconflux.advanced
, which will first try to usetxpool_nextNonce
to get a usable nonce, if failed it will fall back tocfx_getNextNonce
- Add three internal contracts
CrossSpaceCall
,ConfluxContext
,PoSRegister
- Add one method
cfxMappedEVMSpaceAddress
toaddress
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 fieldfromPocket
,toPocket
,fromSpace
,toSpace
- The
call
andcreate
type trace has added one new fieldspace
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
- Add method
checkBalanceAgainstTransaction
, andestimateGasAndCollateralAdvance
to better estimate gas and check balance. - Add the
balance
key in the result ofestimateGasAndCollateralAdvance
as the balance ofoptions.from
.
Support for conflux-rust v1.1.5's RPC changes
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
This version is corresponding to conflux-rust v1.1.3, check it's changelog for detail info.
format.address
will respectnetworkId
,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 fieldoffset
- Add one RPC method
cfx_getAccountPendingInfo
to get account's transaction pending info epochs
pubsub now accept one parametersubscription_epoch
the supported values arelatest_mined
(default) andlatest_state
- Include
blockHash
,epochHash
,epochNumber
,transactionHash
, andtransactionPosition
for trace RPCs - When abi encoding
bytes-N
type, if the data's length is not enough, will auto pad (right) toN
Support new CIP37 address
Conflux
's option can passnetworkId
now, and add a new methodupdateNetworkId
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 parameternetworkId
Transaction
,Message
sign
method need one more parameternetworkId
- Conflux's get methods will return new address, and same to contract method returned address.
getSupplyInfo
response add new fieldtotalCirculating
getStatus
response add new fieldnetworkId