@cascade-fyi/sati-sdk 0.4.2 → 0.6.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/CHANGELOG.md +33 -0
- package/README.md +43 -0
- package/dist/index.cjs +330 -213
- package/dist/index.d.cts +240 -161
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +240 -161
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +329 -214
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.0] - 2026-02-12
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `createSatiUploader()` - zero-config hosted metadata uploader via sati.cascade.fyi (no Pinata JWT needed)
|
|
13
|
+
- Default Photon RPC proxy URLs (`sati.cascade.fyi/api/photon/{network}`) - SDK now works without a Helius API key for Light Protocol queries
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Photon URL fallback changed from `rpcUrl` to hosted proxy - users only need `network` for a working setup
|
|
18
|
+
- `createSatiUploader` exported from main entry alongside `createPinataUploader`
|
|
19
|
+
|
|
20
|
+
## [0.5.0] - 2026-02-12
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- `createPinataUploader(jwt)` and `MetadataUploader` interface exported from main entry - pluggable IPFS upload for agent registration
|
|
25
|
+
- `uploadRegistrationFile(params, uploader)` convenience method on `Sati` class
|
|
26
|
+
- Registration `Endpoint` type extended with optional fields: `mcpTools`, `mcpPrompts`, `mcpResources`, `a2aSkills`, `skills`, `domains`
|
|
27
|
+
- Gateway verification after Pinata uploads - catches silent upload failures with 5s timeout (non-fatal for timeouts/rate limits)
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **BREAKING**: Pinata uploader migrated from v1 (`pinJSONToIPFS`) to v3 Files API (`uploads.pinata.cloud/v3/files`) - returns CIDv1 (`bafkrei...`) instead of CIDv0 (`Qm...`). Both formats are valid IPFS URIs.
|
|
32
|
+
- Compressed attestation queries now use server-side memcmp filtering via Photon RPC for `sasSchema` and `agentMint` (significant performance improvement for large datasets)
|
|
33
|
+
- Client-side filtering retained for `counterparty` and `outcome` fields only
|
|
34
|
+
|
|
35
|
+
### Dependencies
|
|
36
|
+
|
|
37
|
+
- Requires `@cascade-fyi/compression-kit` >= 0.2.1 (memcmp filter support)
|
|
38
|
+
|
|
8
39
|
## [0.4.2] - 2026-02-10
|
|
9
40
|
|
|
10
41
|
### Fixed
|
|
@@ -85,6 +116,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
85
116
|
- Compressed attestation storage via Light Protocol
|
|
86
117
|
- Basic querying via Photon RPC
|
|
87
118
|
|
|
119
|
+
[0.6.0]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.5.0...@cascade-fyi/sati-sdk@0.6.0
|
|
120
|
+
[0.5.0]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.4.2...@cascade-fyi/sati-sdk@0.5.0
|
|
88
121
|
[0.4.2]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.4.1...@cascade-fyi/sati-sdk@0.4.2
|
|
89
122
|
[0.4.1]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.4.0...@cascade-fyi/sati-sdk@0.4.1
|
|
90
123
|
[0.4.0]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.3.0...@cascade-fyi/sati-sdk@0.4.0
|
package/README.md
CHANGED
|
@@ -41,6 +41,7 @@ const result = await sati.registerAgent({
|
|
|
41
41
|
payer, // KeyPairSigner (pays fees + becomes owner)
|
|
42
42
|
name: "MyAgent", // Max 32 chars
|
|
43
43
|
uri: "ipfs://Qm...", // Agent metadata JSON
|
|
44
|
+
owner: ownerAddress, // Optional: mint NFT to a different address
|
|
44
45
|
additionalMetadata: [ // Optional key-value pairs
|
|
45
46
|
{ key: "version", value: "1.0" },
|
|
46
47
|
],
|
|
@@ -51,6 +52,48 @@ console.log(result.mint); // Agent's token address (identity)
|
|
|
51
52
|
console.log(result.memberNumber); // Registry member number
|
|
52
53
|
```
|
|
53
54
|
|
|
55
|
+
### IPFS Upload + Registration
|
|
56
|
+
|
|
57
|
+
Upload a registration file to IPFS and register in one flow:
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import { createPinataUploader } from "@cascade-fyi/sati-sdk";
|
|
61
|
+
|
|
62
|
+
const uploader = createPinataUploader(process.env.PINATA_JWT!);
|
|
63
|
+
|
|
64
|
+
// Build + upload registration file, then register
|
|
65
|
+
const uri = await sati.uploadRegistrationFile(
|
|
66
|
+
{
|
|
67
|
+
name: "MyAgent",
|
|
68
|
+
description: "AI assistant",
|
|
69
|
+
image: "https://example.com/avatar.png",
|
|
70
|
+
endpoints: [
|
|
71
|
+
{ name: "MCP", endpoint: "https://myagent.com/mcp", version: "2025-06-18", mcpTools: ["search"] },
|
|
72
|
+
{ name: "A2A", endpoint: "https://myagent.com/.well-known/agent.json", version: "0.3.0" },
|
|
73
|
+
],
|
|
74
|
+
supportedTrust: ["reputation"],
|
|
75
|
+
},
|
|
76
|
+
uploader,
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const result = await sati.registerAgent({ payer, name: "MyAgent", uri });
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Custom Storage Providers
|
|
83
|
+
|
|
84
|
+
Implement the `MetadataUploader` interface for any storage backend:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
import type { MetadataUploader } from "@cascade-fyi/sati-sdk";
|
|
88
|
+
|
|
89
|
+
const arweaveUploader: MetadataUploader = {
|
|
90
|
+
async upload(data: unknown): Promise<string> {
|
|
91
|
+
// Upload to Arweave and return ar:// URI
|
|
92
|
+
return `ar://${txId}`;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
```
|
|
96
|
+
|
|
54
97
|
---
|
|
55
98
|
|
|
56
99
|
## Creating Attestations
|