Skip to main content

Prerequisites

  • Node.js 18 or higher
  • A Sui wallet (for signing transactions)
  • Basic knowledge of TypeScript

Install the SDK

Connect to Testnet

That is all the setup you need. The client connects to Sui testnet automatically.

Create Your First Agreement

This example creates a two-party escrow where both parties must deposit and both must approve before funds are released.

Full Flow — Step by Step

After creating the agreement, the full lifecycle looks like this:

Step 1 — Party A deposits

Step 2 — Party B deposits

Step 3 — Both parties approve

Step 4 — Anyone settles

Once all conditions are met, any address (including a bot) can trigger settlement.

Step 5 — Each party claims their funds

Read the Agreement State

At any point you can fetch the current state of an agreement:

Next Steps

Core Concepts

Understand how agreements work under the hood

SDK Reference

Full reference for every method and parameter

Freelance App Guide

Build a complete freelance payment app on Pacta

OTC Desk Guide

Build a two-party OTC trading desk on Pacta