@settlemint/sdk-eas 2.3.5-prea6b8850 → 2.3.5-prf7f294ed
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 +334 -132
- package/dist/browser/eas.d.ts +4199 -53
- package/dist/browser/eas.js +409 -10321
- package/dist/browser/eas.js.map +1 -1
- package/dist/eas.cjs +426 -10328
- package/dist/eas.cjs.map +1 -1
- package/dist/eas.d.cts +4199 -53
- package/dist/eas.d.ts +4199 -53
- package/dist/eas.js +409 -10322
- package/dist/eas.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,187 +1,389 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
# @settlemint/sdk-eas
|
|
2
|
+
|
|
3
|
+
Ethereum Attestation Service (EAS) integration for SettleMint SDK with Portal GraphQL support.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- ✅ **Portal SDK Integration**: Full integration with SettleMint Portal GraphQL API
|
|
8
|
+
- ✅ **Complete EAS Support**: All 14 EAS mutations and queries implemented
|
|
9
|
+
- ✅ **Type Safety**: Full TypeScript support with proper type definitions
|
|
10
|
+
- ✅ **Contract Deployment**: Deploy EAS contracts via Portal
|
|
11
|
+
- ✅ **Schema Management**: Register and retrieve attestation schemas
|
|
12
|
+
- ✅ **Attestation Operations**: Create, revoke, and query attestations
|
|
13
|
+
- ✅ **Multi-Operations**: Support for batch attestations and revocations
|
|
14
|
+
- ✅ **Validation**: Built-in attestation validation and timestamp queries
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @settlemint/sdk-eas
|
|
20
|
+
# or
|
|
21
|
+
yarn add @settlemint/sdk-eas
|
|
22
|
+
# or
|
|
23
|
+
bun add @settlemint/sdk-eas
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { createEASClient } from "@settlemint/sdk-eas";
|
|
30
|
+
|
|
31
|
+
// Initialize EAS client with Portal credentials
|
|
32
|
+
const client = createEASClient({
|
|
33
|
+
instance: "https://attestation-portal-ee231.gke-europe.settlemint.com/graphql",
|
|
34
|
+
accessToken: "sm_aat_your_access_token",
|
|
35
|
+
debug: true,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Deploy EAS contracts (if needed)
|
|
39
|
+
const deployment = await client.deploy();
|
|
40
|
+
console.log("EAS deployed at:", deployment.easAddress);
|
|
41
|
+
console.log("Schema Registry at:", deployment.schemaRegistryAddress);
|
|
42
|
+
|
|
43
|
+
// Register a schema
|
|
44
|
+
const schemaResult = await client.registerSchema({
|
|
45
|
+
fields: [
|
|
46
|
+
{ name: "user", type: "address", description: "User's wallet address" },
|
|
47
|
+
{ name: "score", type: "uint256", description: "Reputation score" },
|
|
48
|
+
{ name: "verified", type: "bool", description: "Verification status" },
|
|
49
|
+
],
|
|
50
|
+
resolver: "0x0000000000000000000000000000000000000000",
|
|
51
|
+
revocable: true,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// Create an attestation
|
|
55
|
+
const attestationResult = await client.attest({
|
|
56
|
+
schema: schemaResult.hash,
|
|
57
|
+
data: {
|
|
58
|
+
recipient: "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
|
|
59
|
+
expirationTime: BigInt(0),
|
|
60
|
+
revocable: true,
|
|
61
|
+
refUID: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
62
|
+
data: "0x", // Encoded attestation data
|
|
63
|
+
value: BigInt(0),
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
console.log("Attestation created:", attestationResult.hash);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Portal GraphQL Integration
|
|
71
|
+
|
|
72
|
+
This package integrates with SettleMint's Portal GraphQL API, providing access to all EAS operations:
|
|
73
|
+
|
|
74
|
+
### Available Mutations
|
|
75
|
+
|
|
76
|
+
- `EasSchemaRegistryRegister` - Register new schemas
|
|
77
|
+
- `EasDeploymentAttest` - Create single attestation
|
|
78
|
+
- `EasDeploymentAttestByDelegation` - Create delegated attestation
|
|
79
|
+
- `EasDeploymentMultiAttest` - Create multiple attestations
|
|
80
|
+
- `EasDeploymentMultiAttestByDelegation` - Create multiple delegated attestations
|
|
81
|
+
- `EasDeploymentRevoke` - Revoke single attestation
|
|
82
|
+
- `EasDeploymentRevokeByDelegation` - Revoke by delegation
|
|
83
|
+
- `EasDeploymentMultiRevoke` - Revoke multiple attestations
|
|
84
|
+
- `EasDeploymentMultiRevokeByDelegation` - Revoke multiple by delegation
|
|
85
|
+
- `EasDeploymentRevokeOffchain` - Revoke offchain attestation
|
|
86
|
+
- `EasDeploymentMultiRevokeOffchain` - Revoke multiple offchain
|
|
87
|
+
- `EasDeploymentTimestamp` - Timestamp operation
|
|
88
|
+
- `EasDeploymentMultiTimestamp` - Timestamp multiple operations
|
|
89
|
+
- `EasDeploymentIncreaseNonce` - Increase nonce for delegations
|
|
90
|
+
|
|
91
|
+
### Available Queries
|
|
92
|
+
|
|
93
|
+
- Contract deployment status and addresses
|
|
94
|
+
- Schema retrieval and validation
|
|
95
|
+
- Attestation lookup and verification
|
|
96
|
+
- Transaction monitoring and history
|
|
47
97
|
|
|
48
98
|
## API Reference
|
|
49
99
|
|
|
50
|
-
###
|
|
100
|
+
### EASClient
|
|
51
101
|
|
|
52
|
-
|
|
102
|
+
The main client class for interacting with EAS via Portal.
|
|
53
103
|
|
|
54
|
-
|
|
104
|
+
#### Constructor Options
|
|
55
105
|
|
|
56
|
-
|
|
106
|
+
```typescript
|
|
107
|
+
interface EASClientOptions {
|
|
108
|
+
instance: string; // Portal GraphQL endpoint
|
|
109
|
+
accessToken: string; // Portal access token
|
|
110
|
+
easContractAddress?: Address; // Optional: EAS contract address
|
|
111
|
+
schemaRegistryContractAddress?: Address; // Optional: Schema registry address
|
|
112
|
+
debug?: boolean; // Optional: Enable debug logging
|
|
113
|
+
}
|
|
114
|
+
```
|
|
57
115
|
|
|
58
|
-
|
|
116
|
+
#### Methods
|
|
59
117
|
|
|
60
|
-
|
|
118
|
+
- `deploy()` - Deploy EAS contracts
|
|
119
|
+
- `registerSchema(request)` - Register new schema
|
|
120
|
+
- `attest(request)` - Create attestation
|
|
121
|
+
- `multiAttest(requests)` - Create multiple attestations
|
|
122
|
+
- `revoke(uid, value?)` - Revoke attestation
|
|
123
|
+
- `getSchema(uid)` - Get schema by UID
|
|
124
|
+
- `getSchemas(options?)` - Get all schemas (paginated)
|
|
125
|
+
- `getAttestation(uid)` - Get attestation by UID
|
|
126
|
+
- `getAttestations(options?)` - Get all attestations (paginated)
|
|
127
|
+
- `isValidAttestation(uid)` - Check attestation validity
|
|
128
|
+
- `getTimestamp()` - Get contract timestamp
|
|
129
|
+
- `getOptions()` - Get client configuration
|
|
130
|
+
- `getPortalClient()` - Get Portal client instance
|
|
131
|
+
- `getContractAddresses()` - Get current contract addresses
|
|
61
132
|
|
|
62
|
-
|
|
63
|
-
| ------ | ------ | ------ |
|
|
64
|
-
| `options` | \{ `accessToken`: `string`; `attestationAddress`: `string`; `chainId`: `string`; `chainName`: `string`; `rpcUrl`: `string`; `schemaRegistryAddress`: `string`; \} | Configuration options for the client |
|
|
65
|
-
| `options.accessToken` | `string` | Access token for the RPC provider (must start with 'sm_aat_' or 'sm_pat_') |
|
|
66
|
-
| `options.attestationAddress` | `string` | The address of the EAS Attestation contract |
|
|
67
|
-
| `options.chainId` | `string` | The chain ID to connect to |
|
|
68
|
-
| `options.chainName` | `string` | The name of the chain to connect to |
|
|
69
|
-
| `options.rpcUrl` | `string` | The RPC URL to connect to (must be a valid URL) |
|
|
70
|
-
| `options.schemaRegistryAddress` | `string` | The address of the EAS Schema Registry contract |
|
|
133
|
+
## Examples
|
|
71
134
|
|
|
72
|
-
|
|
135
|
+
See the [examples](./examples/) directory for complete usage examples:
|
|
73
136
|
|
|
74
|
-
`
|
|
137
|
+
- `simple-eas-workflow.ts` - Complete EAS workflow demonstration
|
|
138
|
+
- Real-world attestation scenarios
|
|
139
|
+
- Schema design patterns
|
|
140
|
+
- Multi-attestation operations
|
|
75
141
|
|
|
76
|
-
|
|
142
|
+
## Development Status
|
|
77
143
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
144
|
+
- ✅ **Portal Client Integration**: Complete
|
|
145
|
+
- ✅ **GraphQL Operations**: All 14 EAS mutations implemented
|
|
146
|
+
- ✅ **Type Safety**: Full TypeScript support
|
|
147
|
+
- ✅ **Error Handling**: Comprehensive error handling
|
|
148
|
+
- ✅ **Testing**: Complete test suite
|
|
149
|
+
- ✅ **Documentation**: Full API documentation
|
|
150
|
+
- 🔄 **Real Portal Access**: Requires valid EAS Portal access token
|
|
82
151
|
|
|
83
|
-
|
|
152
|
+
## Requirements
|
|
84
153
|
|
|
85
|
-
|
|
154
|
+
- Node.js 20+
|
|
155
|
+
- Valid SettleMint Portal access token
|
|
156
|
+
- Access to EAS Portal instance
|
|
86
157
|
|
|
87
|
-
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
FSL-1.1-MIT
|
|
161
|
+
|
|
162
|
+
# EAS Portal SDK
|
|
163
|
+
|
|
164
|
+
A TypeScript SDK for interacting with Ethereum Attestation Service (EAS) via SettleMint Portal.
|
|
165
|
+
|
|
166
|
+
## Features
|
|
167
|
+
|
|
168
|
+
- **Portal Integration**: Direct integration with SettleMint Portal GraphQL API
|
|
169
|
+
- **Type Safety**: Full TypeScript support with proper type definitions
|
|
170
|
+
- **Contract Management**: Deploy or connect to existing EAS contracts
|
|
171
|
+
- **Schema Management**: Register and retrieve attestation schemas
|
|
172
|
+
- **Attestation Operations**: Create, retrieve, and validate attestations
|
|
173
|
+
- **Configurable**: No hardcoded values - all addresses and references are configurable
|
|
88
174
|
|
|
89
|
-
|
|
90
|
-
|
|
175
|
+
## Installation
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
npm install @settlemint/sdk-eas
|
|
179
|
+
# or
|
|
180
|
+
bun add @settlemint/sdk-eas
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Quick Start
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
import { createEASClient, ZERO_ADDRESS, ZERO_BYTES32 } from "@settlemint/sdk-eas";
|
|
91
187
|
|
|
92
188
|
const client = createEASClient({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
chainId: "1",
|
|
97
|
-
chainName: "Ethereum",
|
|
98
|
-
rpcUrl: "http://localhost:8545"
|
|
189
|
+
instance: "https://attestation-portal-ee231.gke-europe.settlemint.com/graphql",
|
|
190
|
+
accessToken: "your-portal-access-token",
|
|
191
|
+
debug: true,
|
|
99
192
|
});
|
|
193
|
+
|
|
194
|
+
// Deploy contracts
|
|
195
|
+
const deployment = await client.deploy("0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6");
|
|
196
|
+
|
|
197
|
+
// Register schema
|
|
198
|
+
const schema = await client.registerSchema({
|
|
199
|
+
fields: [
|
|
200
|
+
{ name: "user", type: "address" },
|
|
201
|
+
{ name: "score", type: "uint256" },
|
|
202
|
+
],
|
|
203
|
+
resolver: ZERO_ADDRESS, // No resolver
|
|
204
|
+
revocable: true,
|
|
205
|
+
}, "0x8ba1f109551bD432803012645Hac136c22C177ec");
|
|
206
|
+
|
|
207
|
+
// Create attestation
|
|
208
|
+
const attestation = await client.attest({
|
|
209
|
+
schema: schema.hash,
|
|
210
|
+
data: {
|
|
211
|
+
recipient: "0x9876543210987654321098765432109876543210",
|
|
212
|
+
expirationTime: BigInt(0), // No expiration
|
|
213
|
+
revocable: true,
|
|
214
|
+
refUID: ZERO_BYTES32, // No reference
|
|
215
|
+
data: "0x1234",
|
|
216
|
+
value: BigInt(0),
|
|
217
|
+
},
|
|
218
|
+
}, "0x8ba1f109551bD432803012645Hac136c22C177ec");
|
|
100
219
|
```
|
|
101
220
|
|
|
102
|
-
|
|
221
|
+
## Configuration Constants
|
|
103
222
|
|
|
104
|
-
|
|
223
|
+
The SDK provides configurable constants instead of hardcoded values:
|
|
105
224
|
|
|
106
|
-
|
|
225
|
+
### Address Constants
|
|
107
226
|
|
|
108
|
-
|
|
227
|
+
```typescript
|
|
228
|
+
import { ZERO_ADDRESS, ZERO_BYTES32 } from "@settlemint/sdk-eas";
|
|
109
229
|
|
|
110
|
-
|
|
230
|
+
// Use ZERO_ADDRESS for:
|
|
231
|
+
ZERO_ADDRESS // "0x0000000000000000000000000000000000000000"
|
|
111
232
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
| <a id="resolveraddress"></a> `resolverAddress` | `string` | Address of the resolver contract that will handle attestations | [sdk/eas/src/types.ts:38](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L38) |
|
|
116
|
-
| <a id="revocable"></a> `revocable` | `boolean` | Whether attestations using this schema can be revoked | [sdk/eas/src/types.ts:40](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L40) |
|
|
233
|
+
// Use ZERO_BYTES32 for:
|
|
234
|
+
ZERO_BYTES32 // "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
235
|
+
```
|
|
117
236
|
|
|
118
|
-
|
|
237
|
+
### Configurable Parameters
|
|
119
238
|
|
|
120
|
-
####
|
|
239
|
+
#### 1. Forwarder Address (Contract Deployment)
|
|
121
240
|
|
|
122
|
-
|
|
241
|
+
```typescript
|
|
242
|
+
// Option 1: No meta-transaction forwarder (default)
|
|
243
|
+
await client.deploy(deployerAddress); // Uses ZERO_ADDRESS
|
|
123
244
|
|
|
124
|
-
|
|
245
|
+
// Option 2: Custom forwarder for meta-transactions
|
|
246
|
+
await client.deploy(deployerAddress, "0x1234567890123456789012345678901234567890");
|
|
247
|
+
```
|
|
125
248
|
|
|
126
|
-
|
|
249
|
+
#### 2. Resolver Address (Schema Registration)
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
// Option 1: No resolver (most common)
|
|
253
|
+
await client.registerSchema({
|
|
254
|
+
fields: [...],
|
|
255
|
+
resolver: ZERO_ADDRESS, // No custom validation
|
|
256
|
+
revocable: true,
|
|
257
|
+
}, fromAddress);
|
|
258
|
+
|
|
259
|
+
// Option 2: Custom resolver contract
|
|
260
|
+
await client.registerSchema({
|
|
261
|
+
fields: [...],
|
|
262
|
+
resolver: "0x5678901234567890123456789012345678901234", // Custom validation
|
|
263
|
+
revocable: true,
|
|
264
|
+
}, fromAddress);
|
|
265
|
+
```
|
|
127
266
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
267
|
+
#### 3. Reference UID (Attestation Creation)
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
// Option 1: Standalone attestation (most common)
|
|
271
|
+
await client.attest({
|
|
272
|
+
schema: schemaUID,
|
|
273
|
+
data: {
|
|
274
|
+
recipient: recipientAddress,
|
|
275
|
+
refUID: ZERO_BYTES32, // No reference to other attestations
|
|
276
|
+
// ... other fields
|
|
277
|
+
},
|
|
278
|
+
}, fromAddress);
|
|
279
|
+
|
|
280
|
+
// Option 2: Reference another attestation
|
|
281
|
+
await client.attest({
|
|
282
|
+
schema: schemaUID,
|
|
283
|
+
data: {
|
|
284
|
+
recipient: recipientAddress,
|
|
285
|
+
refUID: "0x1234567890123456789012345678901234567890123456789012345678901234", // Links to parent
|
|
286
|
+
// ... other fields
|
|
287
|
+
},
|
|
288
|
+
}, fromAddress);
|
|
289
|
+
```
|
|
133
290
|
|
|
134
|
-
|
|
291
|
+
#### 4. Expiration Time
|
|
135
292
|
|
|
136
|
-
|
|
293
|
+
```typescript
|
|
294
|
+
// Option 1: No expiration (permanent)
|
|
295
|
+
expirationTime: BigInt(0)
|
|
137
296
|
|
|
138
|
-
|
|
297
|
+
// Option 2: Expires in 24 hours
|
|
298
|
+
expirationTime: BigInt(Math.floor(Date.now() / 1000) + 86400)
|
|
139
299
|
|
|
140
|
-
|
|
300
|
+
// Option 3: Specific timestamp
|
|
301
|
+
expirationTime: BigInt(1735689600) // January 1, 2025
|
|
302
|
+
```
|
|
141
303
|
|
|
142
|
-
|
|
143
|
-
Combines EAS-specific options with base Viem client options.
|
|
304
|
+
#### 5. Value (ETH Amount)
|
|
144
305
|
|
|
145
|
-
|
|
306
|
+
```typescript
|
|
307
|
+
// Option 1: No ETH sent (most common)
|
|
308
|
+
value: BigInt(0)
|
|
146
309
|
|
|
147
|
-
|
|
310
|
+
// Option 2: Send ETH with attestation
|
|
311
|
+
value: BigInt("1000000000000000000") // 1 ETH in wei
|
|
312
|
+
```
|
|
148
313
|
|
|
149
|
-
|
|
314
|
+
## API Reference
|
|
150
315
|
|
|
151
|
-
|
|
316
|
+
### Client Creation
|
|
152
317
|
|
|
153
|
-
|
|
154
|
-
|
|
318
|
+
```typescript
|
|
319
|
+
interface EASClientOptions {
|
|
320
|
+
instance: string; // Portal GraphQL endpoint
|
|
321
|
+
accessToken: string; // Portal access token
|
|
322
|
+
easContractAddress?: Address; // Optional: existing EAS contract
|
|
323
|
+
schemaRegistryContractAddress?: Address; // Optional: existing Schema Registry
|
|
324
|
+
debug?: boolean; // Optional: enable debug logging
|
|
325
|
+
}
|
|
326
|
+
```
|
|
155
327
|
|
|
156
|
-
|
|
328
|
+
### Contract Deployment
|
|
157
329
|
|
|
158
|
-
|
|
330
|
+
```typescript
|
|
331
|
+
async deploy(
|
|
332
|
+
deployerAddress: Address,
|
|
333
|
+
forwarderAddress?: Address, // Optional: defaults to ZERO_ADDRESS
|
|
334
|
+
gasLimit?: string // Optional: defaults to "0x3d0900"
|
|
335
|
+
): Promise<DeploymentResult>
|
|
336
|
+
```
|
|
159
337
|
|
|
160
|
-
|
|
338
|
+
### Schema Registration
|
|
339
|
+
|
|
340
|
+
```typescript
|
|
341
|
+
interface SchemaRequest {
|
|
342
|
+
fields?: SchemaField[]; // Alternative to schema string
|
|
343
|
+
schema?: string; // Alternative to fields
|
|
344
|
+
resolver: Address; // Use ZERO_ADDRESS for no resolver
|
|
345
|
+
revocable: boolean; // Whether attestations can be revoked
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
async registerSchema(
|
|
349
|
+
request: SchemaRequest,
|
|
350
|
+
fromAddress: Address,
|
|
351
|
+
gasLimit?: string
|
|
352
|
+
): Promise<TransactionResult>
|
|
353
|
+
```
|
|
161
354
|
|
|
162
|
-
|
|
355
|
+
### Attestation Creation
|
|
356
|
+
|
|
357
|
+
```typescript
|
|
358
|
+
interface AttestationData {
|
|
359
|
+
recipient: Address; // Who receives the attestation
|
|
360
|
+
expirationTime: bigint; // Use 0 for no expiration
|
|
361
|
+
revocable: boolean; // Whether this can be revoked
|
|
362
|
+
refUID: Hex; // Use ZERO_BYTES32 for no reference
|
|
363
|
+
data: Hex; // Encoded attestation data
|
|
364
|
+
value: bigint; // ETH amount to send (usually 0)
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
async attest(
|
|
368
|
+
request: AttestationRequest,
|
|
369
|
+
fromAddress: Address,
|
|
370
|
+
gasLimit?: string
|
|
371
|
+
): Promise<TransactionResult>
|
|
372
|
+
```
|
|
163
373
|
|
|
164
|
-
|
|
165
|
-
Maps to the Solidity types that can be used in EAS schemas.
|
|
374
|
+
## Examples
|
|
166
375
|
|
|
167
|
-
|
|
376
|
+
See the [examples](./examples/) directory for complete workflows:
|
|
168
377
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
| <a id="address"></a> `address` | `"address"` | `"address"` | [sdk/eas/src/types.ts:7](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L7) |
|
|
172
|
-
| <a id="bool"></a> `bool` | `"bool"` | `"bool"` | [sdk/eas/src/types.ts:8](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L8) |
|
|
173
|
-
| <a id="bytes"></a> `bytes` | `"bytes"` | `"bytes"` | [sdk/eas/src/types.ts:9](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L9) |
|
|
174
|
-
| <a id="bytes32"></a> `bytes32` | `"bytes32"` | `"bytes32"` | [sdk/eas/src/types.ts:10](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L10) |
|
|
175
|
-
| <a id="int256"></a> `int256` | `"int256"` | `"int256"` | [sdk/eas/src/types.ts:12](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L12) |
|
|
176
|
-
| <a id="int8"></a> `int8` | `"int8"` | `"int8"` | [sdk/eas/src/types.ts:14](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L14) |
|
|
177
|
-
| <a id="string"></a> `string` | `"string"` | `"string"` | [sdk/eas/src/types.ts:6](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L6) |
|
|
178
|
-
| <a id="uint256"></a> `uint256` | `"uint256"` | `"uint256"` | [sdk/eas/src/types.ts:11](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L11) |
|
|
179
|
-
| <a id="uint8"></a> `uint8` | `"uint8"` | `"uint8"` | [sdk/eas/src/types.ts:13](https://github.com/settlemint/sdk/blob/v2.3.5/sdk/eas/src/types.ts#L13) |
|
|
378
|
+
- [`simple-eas-workflow.ts`](./examples/simple-eas-workflow.ts) - Complete EAS workflow with configuration options
|
|
379
|
+
- Configuration examples for different use cases
|
|
180
380
|
|
|
181
|
-
##
|
|
381
|
+
## Testing
|
|
182
382
|
|
|
183
|
-
|
|
383
|
+
```bash
|
|
384
|
+
bun test
|
|
385
|
+
```
|
|
184
386
|
|
|
185
387
|
## License
|
|
186
388
|
|
|
187
|
-
|
|
389
|
+
MIT
|