PHP/JavaScript with ChiaLisp

Hi everyone,

I am extremely new to Chia and cryptocurrency. I’m hoping to find some tutorials for how to use ChiaLisp with other programming languages, such as PHP and JavaScript. Does anyone know of any good ones?? I’m trying to build something where those languages all interact with each other to collect and send coins/mojos. Any help would be greatly appreciated!!

Thank you,

Here’s a good looking PHP library for interacting with your node and wallet for doing things like generating receive addresses, getting balances, sending transactions, etc.

For learning more about ChiaLisp and Chia in general, I’d recommend reading:

You don’t necessarily need to know or use ChiaLisp to have PHP interact with your wallet to send/receive coins. ChiaLisp is used to write programs on the blockchain, write smart contracts, mint new coin types, and things like that, but it is not needed in order to perform basic transactions or interact with your node and/or wallet.


Hi Chiameh,

Thanks very much for this! It definitely is helpful. You mentioned that I don’t necessarily need to know or use ChiaLisp to have PHP interact with my wallet. Do you mean that I could find a PHP script that will actually connect to a wallet to do transactions/lookups? If so, do you mind sending me some examples? Again, I’m so very new to this so I’m still a bit confused how it all works together, but right now, I just need to know how to interact with a wallet.

Thank you,

That is correct, ChiaLisp is not needed at all to interact with your wallet. That can be done using Python, PHP, or any language that can communicate over a WebSocket.

The README file for the chia-api PHP library linked above has an example for getting an address, getting a balance, and sending a transaction. This looks like the best starting place for PHP. The author also has other Chia libraries that can be used for things like converting an address to a puzzle_hash or vice-versa.

12.1 Chia RPC API | Chia Documentation talks a bit about the WebSocket API and also the full node API for exploring blocks.