Step 1: Define Your IPC Interface
First, let's define an interface that describes the methods your server will provide. This is like creating a contract between the client and server.
๐ฏ What You're Building
multiply(a, b) โ i32
add(a, b) โ ?
Step 2: Implement the Server
Now let's implement the actual logic for our Calculator service. The server will process incoming requests and return results.
๐ฅ๏ธ Server Status
Step 3: Create the Client
Now let's create a client that can connect to our Calculator server and make IPC calls.
๐ Connection Status
Step 4: Send IPC Messages
Now let's see the IPC in action! Enter values and watch how messages flow between client and server.
๐ฎ IPC Simulator
๐ฆ Packet Inspector
Request Packet
Response Packet
๐ Result
๐ Final Challenge
Time to test your knowledge! Complete this challenge to prove you understand CKB Script IPC.
๐ฏ Challenge: Build a Greeting Service
Create an IPC service that:
- Has a method called
greetthat takes aStringname - Returns
Result<String, u64> - Returns "Hello, {name}!" when successful