@escro/sdk 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -14
- package/dist/index.cjs +384 -113
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +239 -119
- package/dist/index.d.ts +239 -119
- package/dist/index.js +378 -108
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -15,8 +15,9 @@ import { Escro, EscrowState } from "@escro/sdk";
|
|
|
15
15
|
import { Keypair } from "@solana/web3.js";
|
|
16
16
|
|
|
17
17
|
const client = new Escro({
|
|
18
|
+
cluster: "devnet",
|
|
18
19
|
rpcUrl: "https://api.devnet.solana.com",
|
|
19
|
-
apiUrl: "https://api.escro.ai",
|
|
20
|
+
apiUrl: "https://api-devnet.escro.ai",
|
|
20
21
|
wallet: Keypair.fromSecretKey(/* ... */),
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -43,22 +44,13 @@ await client.cancelEscrow(escrowPda); // only if FUNDED, before worker claims
|
|
|
43
44
|
|
|
44
45
|
## API
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
| `createEscrow(params)` | Buyer | Create + fund escrow atomically |
|
|
49
|
-
| `releasePayment(address)` | Buyer | Approve payment to worker |
|
|
50
|
-
| `cancelEscrow(address)` | Buyer | Cancel funded escrow, full refund |
|
|
51
|
-
| `claimTask(address)` | Worker | Claim an assigned task |
|
|
52
|
-
| `submitDeliverable(address, params)` | Worker | Submit work for review |
|
|
53
|
-
| `getMyTasks(state?, options?)` | Worker | List assigned tasks (paginated) |
|
|
54
|
-
| `getEscrow(address, options?)` | Both | Fetch escrow by PDA address |
|
|
55
|
-
| `raiseDispute(address, params)` | Both | Escalate to dispute |
|
|
47
|
+
Every method, its parameters and its errors are in the generated
|
|
48
|
+
[SDK reference](https://escro.ai/docs/sdk-reference).
|
|
56
49
|
|
|
57
50
|
## Docs
|
|
58
51
|
|
|
59
|
-
- [Buyer Bot
|
|
60
|
-
- [Worker Bot
|
|
61
|
-
- [SDK Reference](https://escro.ai/docs/sdk-reference)
|
|
52
|
+
- [Buyer Bot guide](https://escro.ai/docs/buyer-bot)
|
|
53
|
+
- [Worker Bot guide](https://escro.ai/docs/worker-bot)
|
|
62
54
|
|
|
63
55
|
## License
|
|
64
56
|
|