@cascade-fyi/sati-sdk 0.4.1 → 0.5.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 +43 -3
- package/README.md +43 -0
- package/dist/index.cjs +337 -213
- package/dist/index.d.cts +254 -170
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +254 -170
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +336 -214
- package/dist/index.mjs.map +1 -1
- package/idl.json +13 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,43 @@ 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.5.0] - 2026-02-12
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `createPinataUploader(jwt)` and `MetadataUploader` interface exported from main entry - pluggable IPFS upload for agent registration
|
|
13
|
+
- `uploadRegistrationFile(params, uploader)` convenience method on `Sati` class
|
|
14
|
+
- Registration `Endpoint` type extended with optional fields: `mcpTools`, `mcpPrompts`, `mcpResources`, `a2aSkills`, `skills`, `domains`
|
|
15
|
+
- Gateway verification after Pinata uploads - catches silent upload failures with 5s timeout (non-fatal for timeouts/rate limits)
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **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.
|
|
20
|
+
- Compressed attestation queries now use server-side memcmp filtering via Photon RPC for `sasSchema` and `agentMint` (significant performance improvement for large datasets)
|
|
21
|
+
- Client-side filtering retained for `counterparty` and `outcome` fields only
|
|
22
|
+
|
|
23
|
+
### Dependencies
|
|
24
|
+
|
|
25
|
+
- Requires `@cascade-fyi/compression-kit` >= 0.2.1 (memcmp filter support)
|
|
26
|
+
|
|
27
|
+
## [0.4.2] - 2026-02-10
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Close attestation off-by-one error: program was reading `agent_mint`/`counterparty` at offsets 32/64 instead of 33/65, skipping the `layout_version` byte - caused every close/update attempt to fail with `AgentMintAccountMismatch`
|
|
32
|
+
- Missing SAS CPI accounts (`sasEventAuthority`, `systemProgram`) in `closeRegularAttestation` instruction - previously caused runtime panics
|
|
33
|
+
- Wired `sasEventAuthority` into `closeRegularAttestation()` and `updateReputationScore()` SDK methods
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- `deriveSasEventAuthorityPda()` helper for SAS event authority PDA derivation
|
|
38
|
+
|
|
39
|
+
## [0.4.1] - 2026-02-09
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- Fixed `workspace:*` dependency for `@cascade-fyi/compression-kit` not being resolved in published npm package, breaking installs for npm/yarn users
|
|
44
|
+
|
|
8
45
|
## [0.4.0] - 2026-02-06
|
|
9
46
|
|
|
10
47
|
### Added
|
|
@@ -67,6 +104,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
67
104
|
- Compressed attestation storage via Light Protocol
|
|
68
105
|
- Basic querying via Photon RPC
|
|
69
106
|
|
|
70
|
-
[0.
|
|
71
|
-
[0.
|
|
72
|
-
[0.
|
|
107
|
+
[0.5.0]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.4.2...@cascade-fyi/sati-sdk@0.5.0
|
|
108
|
+
[0.4.2]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.4.1...@cascade-fyi/sati-sdk@0.4.2
|
|
109
|
+
[0.4.1]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.4.0...@cascade-fyi/sati-sdk@0.4.1
|
|
110
|
+
[0.4.0]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.3.0...@cascade-fyi/sati-sdk@0.4.0
|
|
111
|
+
[0.3.0]: https://github.com/cascade-protocol/sati/compare/@cascade-fyi/sati-sdk@0.2.0...@cascade-fyi/sati-sdk@0.3.0
|
|
112
|
+
[0.2.0]: https://github.com/cascade-protocol/sati/releases/tag/@cascade-fyi/sati-sdk@0.2.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
|