@settlemint/sdk-eas 2.2.2-pr5ceade05 → 2.2.2-prd773eb0f
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 +57 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @settlemint/sdk-eas
|
|
2
|
+
|
|
3
|
+
Ethereum Attestation Service (EAS) integration for SettleMint SDK.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- [ ] Attestation submit/parse
|
|
8
|
+
- [ ] Graph query helpers
|
|
9
|
+
- [ ] Schema creation utils
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @settlemint/sdk-eas
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { createEASClient } from '@settlemint/sdk-eas';
|
|
21
|
+
import { getPublicClient, getWalletClient } from '@settlemint/sdk-viem';
|
|
22
|
+
|
|
23
|
+
const publicClient = getPublicClient({ ... });
|
|
24
|
+
const walletClient = getWalletClient({ ... });
|
|
25
|
+
|
|
26
|
+
const easClient = createEASClient({
|
|
27
|
+
publicClient,
|
|
28
|
+
walletClient,
|
|
29
|
+
schemaRegistryAddress: '0x...',
|
|
30
|
+
attestationContractAddress: '0x...',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Create a schema
|
|
34
|
+
const schemaId = await easClient.createSchema({
|
|
35
|
+
schema: 'bytes32 documentHash,uint256 timestamp,address userId',
|
|
36
|
+
resolver: '0x...',
|
|
37
|
+
revocable: true,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Submit an attestation
|
|
41
|
+
const attestationId = await easClient.submitAttestation(schemaId, {
|
|
42
|
+
recipient: '0x...',
|
|
43
|
+
expirationTime: 0n,
|
|
44
|
+
revocable: true,
|
|
45
|
+
data: '0x...',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// Parse an attestation
|
|
49
|
+
const attestation = await easClient.parseAttestation(attestationId);
|
|
50
|
+
|
|
51
|
+
// Get attestations for a schema
|
|
52
|
+
const attestations = await easClient.getAttestations(schemaId);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
FSL-1.1-MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@settlemint/sdk-eas",
|
|
3
3
|
"description": "Ethereum Attestation Service (EAS) integration for SettleMint SDK",
|
|
4
|
-
"version": "2.2.2-
|
|
4
|
+
"version": "2.2.2-prd773eb0f",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "FSL-1.1-MIT",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@settlemint/sdk-utils": "2.2.2-
|
|
54
|
+
"@settlemint/sdk-utils": "2.2.2-prd773eb0f",
|
|
55
55
|
"viem": "^2.7.9"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {},
|