JSSDK 0.5.1 release
2023-09-06
Hi all, we release JS-SDK v0.5.1 today since it have been stay in beta channel for a long time.
Breaking Changes
Please note that v0.5.1 will be a breaking change compared to v0.5.0. After the next major update of the mainnet, v0.5.0 will no longer function, so please ensure compatibility with any versions prior to that update.
- Breaking: remove the deprecated
create
function. Please check our documentation for instructions on integrating with Phat Contract.
- Breaking: update the protobuf generated codes for
Phactory
.
PinkLoggerContractPromise
- Added Supported to LogServer 1.2. added
getInfo
API inspecting LogServer capacity.
- Two new redesigned APIs:
head
&tail
.
- You can now instantiate the
PinkLoggerContractPromise
object without connecting to the WS RPC endpoint. The example can be found here.
- Several typing improvements.
Hosted Metadata
We have added additional functions to retrieve ABI JSON files and wasm files based on codehash. We now support two sources:
- Phat Contract Artifacts. The GitHub Page can found all Phat Contract artifacts built by the Phala Team.
Includes:
unsafeCheckCodeHashExists
unsafeGetContractCodeHash
unsafeGetAbiFromPatronByCodeHash
unsafeGetAbiFromGitHubRepoByCodeHash
unsafeGetWasmFromPatronByCodeHash
unsafeGetWasmFromGithubRepoByCodeHash
Experimental Feature
We are currently working on supporting signing certificates with Ethereum wallets, such as MetaMask. This feature is still in the experimental phase and is not yet available on the mainnet.
Misc
- Feat: exporting the
createPruntimeClient
function.
- Feat: exporting the
signAndSend
function.
- Imp: we don't need the
api
parameter forsignCertificate
anymore.
- Imp: typing for
PinkContractPromise
tx
andquery
.
- Imp: Full supports for PinkQuery arguments.
- Fix:
PinkCodePromise
doesn't work as properly when passing wasm code in blob object.
- Fix: The SDK cannot connect to a custom PRuntime node that has not been registered on the chain yet.
- Fix: The SDK internally deposits to the cluster when submitting a transaction.
- Fix: The ABI metadata for the SystemContract is out of date, so we need update it.
- Docs: Added simple docs for the
PinkLoggerContractPromise
.
- Docs: Added code snippets for inspecting contract information.