All notable changes to this project will be documented in this file, as of version 0.2.0
.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Delete console.log
- Add functionAptos in txParams for Dapps to sendUncheckedTransaction in Aptos networks
- Support aptos GET restful api for JsonRpcProvider used in window.starcoin injected into Dapps from Starmask
- Fix: Replace halley chainId from 3 to 253
- Support Aptos which address length is 64, while starcoin address length is 32
- Fix: TypeError: Buffer.from(...).readBigUInt64LE is not a function in browsers, #54
- Fix: encodeScriptFunctionByResolve support arg type of { Vector: 'Address' }, example: 0x1::TransferScripts::batch_peer_to_peer_v2
- Fix #42 #43: transaction generated by encodePackage will fail when dry_run_raw on chain
- Fix #48: Reverse adding read-bigint, which is incompatible in webpack5
- Fix #46: add test for encodeScriptFunctionByResolve call functionId 0x1::TransferScripts::batch_peer_to_peer_v2
- fix: empty string should return Uint8Array(1)[0], instead of emptey
- replace @starcoin/stc-ed25519 with @noble/ed25519, because the latest version of @noble/ed25519 already supports BigInt.
- replace xxxn with BigInt(xxx)
- export version
- support optional custom addGasBufferMultiplier(default 1.5) in transaction params
- args in encodeScriptFunctionByResolve support string, add test case: encodeScriptFunctionByResolve3
- replace stringToBytes(str) with: new Uint8Array(Buffer.from(str))
- replaced bytesToString(arr) with: Buffer.from(arr).toString()
- add encoding.stringToBytes && encoding.bytesToString
- add one param(gasUniPrice) in utils.tx.generateRawUserTransaction
- support contract.call_v2 method in rpc actions
- add utils.tx.encodeScriptFunctionByResolve
- support '_' and '-' character in module and function name
- support optional expiredSecs in txParams, default value is 43200(12hours)
-
add test case for deploy contract using blob hex
yarn test:unit src/providers/jsonrpc-provider.spec.ts --testNamePattern="deploy contract"
-
add test case for decode SignedMessage
yarn test:unit src/utils/signed-message.spec.ts --testNamePattern="decode"
-
add chain_id in SignedMessage
-
add encoding.packageHexToTransactionPayload / packageHexToTransactionPayloadHex
-
support contract.dry_run_raw
-
add 2 functions in utils.signedMessage
- encodeSignedMessage
- recoverSignedMessageAddress
-
add 2 test cases
yarn test:unit src/utils/signed-message.spec.ts --testNamePattern="encode SignedMessage: simple-keyring"
yarn test:unit src/utils/signed-message.spec.ts --testNamePattern="encode SignedMessage: hd-keyring"
-
support
Personal Sign
in starmask-test-dapp
- add utils.tx.encodeStructTypeTags
- fix: hexStripZeros will delete the first 0 if address is start with 0x0, use addHexPrefix indeed
- payload of generateRawUserTransaction should be caculated from outside and be passed in
- add test case for 0x1::DaoVoteScripts::cast_vote
- add Web3Provider
- replace JsonrpcProvider with JsonRpcProvider
- support
Send STC
in starmask-test-dapp
- Remove jsSHA package and still use js-sha3 to hash
- Fix buffer error in browser
- Remove util TextEncoder & TextDecoder
- Use 'util' package to get 'util.TextEncoder', supporting node.js 10
- Add utils.tx.generateRawUserTransaction
- Add utils.tx.signRawUserTransaction
- Remove utils.tx.generateSignedUserTransactionHex
- Modify related test cases in encoding/index.spec.ts and providers/jsonrpc-provider.spec.ts
- Add functions to convert private key to public key and public key to auth key & address (#16)
- Add event decoding
- Add utils.tx.generateSignedUserTransactionHex