make-software / casper-php-sdk Goto Github PK
View Code? Open in Web Editor NEWPHP SDK to interact with the Casper Network nodes via RPC
License: Apache License 2.0
PHP SDK to interact with the Casper Network nodes via RPC
License: Apache License 2.0
Casper TestNet has been upgraded to v1.5.2, and we need to update Casper PHP SDK to support the new upgrade. Please see the relevant correspondence below.
--
Dear SDK Maintainers,
The upcoming Casper Node 1.5.2 release includes several notable changes intended to improve the functionality of the Casper Node.
Please refer to the information on new and updated RPC endpoint changes in the link provided below.[This is in continuation to the previously shared emails on this same topic]
Kindly verify and ensure that the SDKs are in accordance with Casper Node 1.5.2. Please check the other changes detailed in the document and take necessary action where applicable. Where applicable, please test the contracts and applications on Testnet.
We will provide a more comprehensive update on the general changes closer to the commencement of the Mainnet activation.
Key changes and more details can be found here:
https://docs.google.com/document/d/1Kofed_goaD5Cn50JKZtdwKeAiL9KFzMm0PmQhrd_X24/edit
--
The upcoming Casper Node 1.5 release includes several notable changes intended to improve the functionality of the Casper Node. The following are the key changes of relevance for our Contract, SDK, and dApp developers.
Note: The Casper-Client v2.0.0 will be released along with Node v1.5 containing the RPC changes for 1.5. Hence, please build it off the current dev branch https://github.com/casper-ecosystem/casper-client-rs. The client's current generally available version v1.6.0 does not have the relevant changes.
New endpoints - non-breaking changes
https://github.com/casper-network/casper-node/pull/3093 - We added a significant feature via an RPC endpoint speculative_exec, which enables contract developers to estimate the potential gas cost of a deploy and test it on test and integration networks.
https://github.com/casper-network/casper-node/pull/2705 - Status endpoint added run mode.
https://github.com/casper-network/casper-node/pull/2703 - A new RPC and REST endpoint "info_get_chainspec". Querying this endpoint will output the bytes of the chainspec.toml, which can then be used to view the contents of the chainspec by writing the output to a file etc.
https://github.com/casper-network/casper-node/pull/2868 - We have deprecated the get-balance RPC and replaced it with an enhanced version query-balance RPC.
The system now provides meaningful responses for missing block information when queried, the following are endpoints which do.
chain_get_block
chain_get_block_transfers
chain_get_era_info_by_switch_block
chain_get_era_summary
chain_get_state_root_hash
query_balance
query_global_state
speculative_exec
state_get_account_info
state_get_auction_info
state_get_dictionary_item
state_get_item
We are also releasing a new version of Casper-types (v3.0.0), there are several updates, including the addition of many new keys and stored value variants, a new type for UnbondingPurses, and an increase in DICTIONARY_ITEM_KEY_MAX_LENGTH from 64 to 128. And t[here](https://docs.google.com/document/d/1M5uux_Ry4HzaD46DL9q1vd-M_QSqpMrcxTjHh3NgfxU/edit?usp=share_link) are possible breaking changes depending on your specific implementation, like new key variants and changes under the changed section, details here.
I am trying to do this using this library (I can't use casper-client). E.g. I want
020396133b3bbbfcf7d1961390f9449e2de5813523180376df361cb31a1ca965b576 (public key)
ˇˇhow to convert?ˇˇ
2f3924ea629d8c219129caf2004e19cc5dabfdafb0f0fca86c4de477c2f8a1a5 (account hash)
How?
Try to deserialize the "System proposed switch block" -> the .Net SDK fails because the Proposer is normally a PublicKey but now it is "00" which is invalid.
The system-propsoed switch block: https://cspr.live/block/1562c81ea1623b6c882370b4a659b797e06e30ddbc0053b6b0d3a1aef71c6d33
First discovered on the .NET SDK: make-software/casper-net-sdk#37
What happened?
Error during compilation when using PHP8.x.x.
What did you expect to happen?
The build has to happen.
Are you willing to submit a pull request to fix this bug?
Yes
We have recently updated the Casper SDK Specification. You can find the updated documentation here: https://docs.casperlabs.io/dapp-dev-guide/sdkspec/introduction/.
Refer to the updated Casper SDK Specification and please make necessary updates/changes to the PHP Client SDK Libraries.
Should you have any questions or feedback regarding the updated SDK Specification, please do not hesitate to revert on this issue.
What happened?
Hi, I am new to PHP. I tested the transfer code in SendingTransfe but it gave me the following error. The code is attached in the comment.
Fatal error: Uncaught Casper\Rpc\RpcError: invalid deploy: the provided hash does not match the actual hash of the deploy in C:\xampp\htdocs\myproject1\composer_1\vendor\make-software\casper-php-sdk\src\Rpc\RpcClient.php:380 Stack trace: #0 C:\xampp\htdocs\myproject1\composer_1\vendor\make-software\casper-php-sdk\src\Rpc\RpcClient.php(78): Casper\Rpc\RpcClient->rpcCallMethod('account_put_dep...', Array) #1 C:\xampp\htdocs\myproject1\composer_1\06_contracthash.php(33): Casper\Rpc\RpcClient->putDeploy(Object(Casper\Entity\Deploy)) #2 {main} thrown in C:\xampp\htdocs\myproject1\composer_1\vendor\make-software\casper-php-sdk\src\Rpc\RpcClient.php on line 380
What did you expect to happen?
No error happens.
Are you willing to submit a pull request to fix this bug?
No.
What happened?
No CI actions on PR
What did you expect to happen?
A minimal CI action on PR
Are you willing to submit a pull request to fix this bug?
~
What happened?
[email protected]: Permission denied (publickey).
What did you expect to happen?
There should be cloning without the need for an SSH key.
Are you willing to submit a pull request to fix this bug?
PR for solution:: #25
It is possible to get an error similar to the following during Secp256K1 installation.
For example : [email protected]: Permission denied (publickey).
This problem can be solved in a very simple way. Web urls for cloning can be added to the documentation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.