@settlemint/sdk-eas 2.5.5-prfc0fb3b8 → 2.5.6-pr36157bee

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 CHANGED
@@ -324,9 +324,13 @@ async function runDemo() {
324
324
  }
325
325
 
326
326
  // Use environment variables for RPC endpoint
327
- const rpcUrl = env.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT || env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT;
327
+ const rpcUrl =
328
+ env.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT ||
329
+ env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT;
328
330
  if (!rpcUrl) {
329
- console.error("❌ Please set SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT or SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT environment variable");
331
+ console.error(
332
+ "❌ Please set SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT or SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT environment variable",
333
+ );
330
334
  return;
331
335
  }
332
336
 
@@ -599,7 +603,7 @@ async function runEASWorkflow() {
599
603
  console.log("🚀 Simple EAS SDK Workflow");
600
604
  console.log("===========================\n");
601
605
 
602
- let deployedAddresses: { easAddress: Address; schemaRegistryAddress: Address };
606
+ let _deployedAddresses: { easAddress: Address; schemaRegistryAddress: Address };
603
607
  let schemaResult: { hash: Hex } | undefined;
604
608
 
605
609
  // Step 1: Initialize EAS Client
@@ -622,7 +626,7 @@ async function runEASWorkflow() {
622
626
  console.log(` EAS: ${deployment.easAddress}`);
623
627
  console.log(` Schema Registry: ${deployment.schemaRegistryAddress}\n`);
624
628
 
625
- deployedAddresses = {
629
+ _deployedAddresses = {
626
630
  easAddress: deployment.easAddress,
627
631
  schemaRegistryAddress: deployment.schemaRegistryAddress,
628
632
  };
@@ -946,7 +950,7 @@ export { runEASWorkflow, type UserReputationSchema };
946
950
 
947
951
  > **createEASClient**(`options`): [`EASClient`](#easclient)
948
952
 
949
- Defined in: [sdk/eas/src/eas.ts:716](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L716)
953
+ Defined in: [sdk/eas/src/eas.ts:716](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L716)
950
954
 
951
955
  Create an EAS client instance
952
956
 
@@ -985,7 +989,7 @@ const deployment = await easClient.deploy("0x1234...deployer-address");
985
989
 
986
990
  #### EASClient
987
991
 
988
- Defined in: [sdk/eas/src/eas.ts:44](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L44)
992
+ Defined in: [sdk/eas/src/eas.ts:44](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L44)
989
993
 
990
994
  Main EAS client class for interacting with Ethereum Attestation Service via Portal
991
995
 
@@ -1010,7 +1014,7 @@ console.log("EAS deployed at:", deployment.easAddress);
1010
1014
 
1011
1015
  > **new EASClient**(`options`): [`EASClient`](#easclient)
1012
1016
 
1013
- Defined in: [sdk/eas/src/eas.ts:55](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L55)
1017
+ Defined in: [sdk/eas/src/eas.ts:55](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L55)
1014
1018
 
1015
1019
  Create a new EAS client instance
1016
1020
 
@@ -1035,7 +1039,7 @@ Create a new EAS client instance
1035
1039
 
1036
1040
  > **attest**(`request`, `fromAddress`, `gasLimit?`): `Promise`\<[`TransactionResult`](#transactionresult)\>
1037
1041
 
1038
- Defined in: [sdk/eas/src/eas.ts:295](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L295)
1042
+ Defined in: [sdk/eas/src/eas.ts:295](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L295)
1039
1043
 
1040
1044
  Create an attestation
1041
1045
 
@@ -1085,7 +1089,7 @@ console.log("Attestation created:", attestationResult.hash);
1085
1089
 
1086
1090
  > **deploy**(`deployerAddress`, `forwarderAddress?`, `gasLimit?`): `Promise`\<[`DeploymentResult`](#deploymentresult)\>
1087
1091
 
1088
- Defined in: [sdk/eas/src/eas.ts:106](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L106)
1092
+ Defined in: [sdk/eas/src/eas.ts:106](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L106)
1089
1093
 
1090
1094
  Deploy EAS contracts via Portal
1091
1095
 
@@ -1127,7 +1131,7 @@ console.log("EAS Contract:", deployment.easAddress);
1127
1131
 
1128
1132
  > **getAttestation**(`uid`): `Promise`\<[`AttestationInfo`](#attestationinfo)\>
1129
1133
 
1130
- Defined in: [sdk/eas/src/eas.ts:549](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L549)
1134
+ Defined in: [sdk/eas/src/eas.ts:549](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L549)
1131
1135
 
1132
1136
  Get an attestation by UID
1133
1137
 
@@ -1145,7 +1149,7 @@ Get an attestation by UID
1145
1149
 
1146
1150
  > **getAttestations**(`_options?`): `Promise`\<[`AttestationInfo`](#attestationinfo)[]\>
1147
1151
 
1148
- Defined in: [sdk/eas/src/eas.ts:589](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L589)
1152
+ Defined in: [sdk/eas/src/eas.ts:589](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L589)
1149
1153
 
1150
1154
  Get attestations with pagination and filtering
1151
1155
 
@@ -1167,7 +1171,7 @@ Consider using getAttestation() for individual attestation lookups.
1167
1171
 
1168
1172
  > **getContractAddresses**(): `object`
1169
1173
 
1170
- Defined in: [sdk/eas/src/eas.ts:662](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L662)
1174
+ Defined in: [sdk/eas/src/eas.ts:662](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L662)
1171
1175
 
1172
1176
  Get current contract addresses
1173
1177
 
@@ -1177,14 +1181,14 @@ Get current contract addresses
1177
1181
 
1178
1182
  | Name | Type | Defined in |
1179
1183
  | ------ | ------ | ------ |
1180
- | `easAddress?` | `` `0x${string}` `` | [sdk/eas/src/eas.ts:662](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L662) |
1181
- | `schemaRegistryAddress?` | `` `0x${string}` `` | [sdk/eas/src/eas.ts:662](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L662) |
1184
+ | `easAddress?` | `` `0x${string}` `` | [sdk/eas/src/eas.ts:662](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L662) |
1185
+ | `schemaRegistryAddress?` | `` `0x${string}` `` | [sdk/eas/src/eas.ts:662](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L662) |
1182
1186
 
1183
1187
  ###### getOptions()
1184
1188
 
1185
1189
  > **getOptions**(): `object`
1186
1190
 
1187
- Defined in: [sdk/eas/src/eas.ts:648](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L648)
1191
+ Defined in: [sdk/eas/src/eas.ts:648](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L648)
1188
1192
 
1189
1193
  Get client configuration
1190
1194
 
@@ -1192,17 +1196,17 @@ Get client configuration
1192
1196
 
1193
1197
  | Name | Type | Default value | Description | Defined in |
1194
1198
  | ------ | ------ | ------ | ------ | ------ |
1195
- | `accessToken?` | `string` | - | The application access token | [sdk/eas/src/utils/validation.ts:21](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L21) |
1196
- | `debug?` | `boolean` | - | Whether to enable debug mode | [sdk/eas/src/utils/validation.ts:33](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L33) |
1197
- | `easContractAddress?` | `` `0x${string}` `` | - | The EAS contract address | [sdk/eas/src/utils/validation.ts:25](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L25) |
1198
- | `instance` | `string` | `UrlSchema` | The EAS instance URL | [sdk/eas/src/utils/validation.ts:17](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L17) |
1199
- | `schemaRegistryContractAddress?` | `` `0x${string}` `` | - | The schema registry contract address | [sdk/eas/src/utils/validation.ts:29](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L29) |
1199
+ | `accessToken?` | `string` | - | The application access token | [sdk/eas/src/utils/validation.ts:21](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L21) |
1200
+ | `debug?` | `boolean` | - | Whether to enable debug mode | [sdk/eas/src/utils/validation.ts:33](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L33) |
1201
+ | `easContractAddress?` | `` `0x${string}` `` | - | The EAS contract address | [sdk/eas/src/utils/validation.ts:25](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L25) |
1202
+ | `instance` | `string` | `UrlSchema` | The EAS instance URL | [sdk/eas/src/utils/validation.ts:17](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L17) |
1203
+ | `schemaRegistryContractAddress?` | `` `0x${string}` `` | - | The schema registry contract address | [sdk/eas/src/utils/validation.ts:29](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L29) |
1200
1204
 
1201
1205
  ###### getPortalClient()
1202
1206
 
1203
1207
  > **getPortalClient**(): `GraphQLClient`
1204
1208
 
1205
- Defined in: [sdk/eas/src/eas.ts:655](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L655)
1209
+ Defined in: [sdk/eas/src/eas.ts:655](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L655)
1206
1210
 
1207
1211
  Get the Portal client instance for advanced operations
1208
1212
 
@@ -1214,7 +1218,7 @@ Get the Portal client instance for advanced operations
1214
1218
 
1215
1219
  > **getSchema**(`uid`): `Promise`\<[`SchemaData`](#schemadata)\>
1216
1220
 
1217
- Defined in: [sdk/eas/src/eas.ts:506](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L506)
1221
+ Defined in: [sdk/eas/src/eas.ts:506](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L506)
1218
1222
 
1219
1223
  Get a schema by UID
1220
1224
 
@@ -1232,7 +1236,7 @@ Get a schema by UID
1232
1236
 
1233
1237
  > **getSchemas**(`_options?`): `Promise`\<[`SchemaData`](#schemadata)[]\>
1234
1238
 
1235
- Defined in: [sdk/eas/src/eas.ts:540](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L540)
1239
+ Defined in: [sdk/eas/src/eas.ts:540](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L540)
1236
1240
 
1237
1241
  Get all schemas with pagination
1238
1242
 
@@ -1254,7 +1258,7 @@ Consider using getSchema() for individual schema lookups.
1254
1258
 
1255
1259
  > **getTimestamp**(`data`): `Promise`\<`bigint`\>
1256
1260
 
1257
- Defined in: [sdk/eas/src/eas.ts:623](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L623)
1261
+ Defined in: [sdk/eas/src/eas.ts:623](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L623)
1258
1262
 
1259
1263
  Get the timestamp for specific data
1260
1264
 
@@ -1274,7 +1278,7 @@ The timestamp when the data was timestamped
1274
1278
 
1275
1279
  > **isValidAttestation**(`uid`): `Promise`\<`boolean`\>
1276
1280
 
1277
- Defined in: [sdk/eas/src/eas.ts:598](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L598)
1281
+ Defined in: [sdk/eas/src/eas.ts:598](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L598)
1278
1282
 
1279
1283
  Check if an attestation is valid
1280
1284
 
@@ -1292,7 +1296,7 @@ Check if an attestation is valid
1292
1296
 
1293
1297
  > **multiAttest**(`requests`, `fromAddress`, `gasLimit?`): `Promise`\<[`TransactionResult`](#transactionresult)\>
1294
1298
 
1295
- Defined in: [sdk/eas/src/eas.ts:386](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L386)
1299
+ Defined in: [sdk/eas/src/eas.ts:386](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L386)
1296
1300
 
1297
1301
  Create multiple attestations in a single transaction
1298
1302
 
@@ -1355,7 +1359,7 @@ console.log("Multiple attestations created:", multiAttestResult.hash);
1355
1359
 
1356
1360
  > **registerSchema**(`request`, `fromAddress`, `gasLimit?`): `Promise`\<[`TransactionResult`](#transactionresult)\>
1357
1361
 
1358
- Defined in: [sdk/eas/src/eas.ts:216](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L216)
1362
+ Defined in: [sdk/eas/src/eas.ts:216](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L216)
1359
1363
 
1360
1364
  Register a new schema in the EAS Schema Registry
1361
1365
 
@@ -1399,7 +1403,7 @@ console.log("Schema registered:", schemaResult.hash);
1399
1403
 
1400
1404
  > **revoke**(`schemaUID`, `attestationUID`, `fromAddress`, `value?`, `gasLimit?`): `Promise`\<[`TransactionResult`](#transactionresult)\>
1401
1405
 
1402
- Defined in: [sdk/eas/src/eas.ts:464](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/eas.ts#L464)
1406
+ Defined in: [sdk/eas/src/eas.ts:464](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/eas.ts#L464)
1403
1407
 
1404
1408
  Revoke an existing attestation
1405
1409
 
@@ -1443,7 +1447,7 @@ console.log("Attestation revoked:", revokeResult.hash);
1443
1447
 
1444
1448
  #### AttestationData
1445
1449
 
1446
- Defined in: [sdk/eas/src/schema.ts:63](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L63)
1450
+ Defined in: [sdk/eas/src/schema.ts:63](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L63)
1447
1451
 
1448
1452
  Attestation data structure
1449
1453
 
@@ -1451,18 +1455,18 @@ Attestation data structure
1451
1455
 
1452
1456
  | Property | Type | Description | Defined in |
1453
1457
  | ------ | ------ | ------ | ------ |
1454
- | <a id="data"></a> `data` | `` `0x${string}` `` | Encoded attestation data | [sdk/eas/src/schema.ts:73](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L73) |
1455
- | <a id="expirationtime"></a> `expirationTime` | `bigint` | Expiration time (0 for no expiration) | [sdk/eas/src/schema.ts:67](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L67) |
1456
- | <a id="recipient"></a> `recipient` | `` `0x${string}` `` | Recipient of the attestation | [sdk/eas/src/schema.ts:65](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L65) |
1457
- | <a id="refuid"></a> `refUID` | `` `0x${string}` `` | Reference UID (use ZERO_BYTES32 for no reference) | [sdk/eas/src/schema.ts:71](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L71) |
1458
- | <a id="revocable"></a> `revocable` | `boolean` | Whether this attestation can be revoked | [sdk/eas/src/schema.ts:69](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L69) |
1459
- | <a id="value"></a> `value` | `bigint` | Value sent with the attestation | [sdk/eas/src/schema.ts:75](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L75) |
1458
+ | <a id="data"></a> `data` | `` `0x${string}` `` | Encoded attestation data | [sdk/eas/src/schema.ts:73](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L73) |
1459
+ | <a id="expirationtime"></a> `expirationTime` | `bigint` | Expiration time (0 for no expiration) | [sdk/eas/src/schema.ts:67](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L67) |
1460
+ | <a id="recipient"></a> `recipient` | `` `0x${string}` `` | Recipient of the attestation | [sdk/eas/src/schema.ts:65](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L65) |
1461
+ | <a id="refuid"></a> `refUID` | `` `0x${string}` `` | Reference UID (use ZERO_BYTES32 for no reference) | [sdk/eas/src/schema.ts:71](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L71) |
1462
+ | <a id="revocable"></a> `revocable` | `boolean` | Whether this attestation can be revoked | [sdk/eas/src/schema.ts:69](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L69) |
1463
+ | <a id="value"></a> `value` | `bigint` | Value sent with the attestation | [sdk/eas/src/schema.ts:75](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L75) |
1460
1464
 
1461
1465
  ***
1462
1466
 
1463
1467
  #### AttestationInfo
1464
1468
 
1465
- Defined in: [sdk/eas/src/schema.ts:115](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L115)
1469
+ Defined in: [sdk/eas/src/schema.ts:115](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L115)
1466
1470
 
1467
1471
  Attestation information
1468
1472
 
@@ -1470,22 +1474,22 @@ Attestation information
1470
1474
 
1471
1475
  | Property | Type | Description | Defined in |
1472
1476
  | ------ | ------ | ------ | ------ |
1473
- | <a id="attester"></a> `attester` | `` `0x${string}` `` | Address that created the attestation | [sdk/eas/src/schema.ts:121](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L121) |
1474
- | <a id="data-1"></a> `data` | `` `0x${string}` `` | Encoded attestation data | [sdk/eas/src/schema.ts:133](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L133) |
1475
- | <a id="expirationtime-1"></a> `expirationTime` | `bigint` | Expiration timestamp | [sdk/eas/src/schema.ts:127](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L127) |
1476
- | <a id="recipient-1"></a> `recipient` | `` `0x${string}` `` | Recipient of the attestation | [sdk/eas/src/schema.ts:123](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L123) |
1477
- | <a id="refuid-1"></a> `refUID` | `` `0x${string}` `` | Reference UID | [sdk/eas/src/schema.ts:131](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L131) |
1478
- | <a id="revocable-1"></a> `revocable` | `boolean` | Whether this attestation can be revoked | [sdk/eas/src/schema.ts:129](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L129) |
1479
- | <a id="schema"></a> `schema` | `` `0x${string}` `` | Schema UID | [sdk/eas/src/schema.ts:119](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L119) |
1480
- | <a id="time"></a> `time` | `bigint` | Creation timestamp | [sdk/eas/src/schema.ts:125](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L125) |
1481
- | <a id="uid"></a> `uid` | `` `0x${string}` `` | Attestation UID | [sdk/eas/src/schema.ts:117](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L117) |
1482
- | <a id="value-1"></a> `value` | `bigint` | Value sent with the attestation | [sdk/eas/src/schema.ts:135](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L135) |
1477
+ | <a id="attester"></a> `attester` | `` `0x${string}` `` | Address that created the attestation | [sdk/eas/src/schema.ts:121](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L121) |
1478
+ | <a id="data-1"></a> `data` | `` `0x${string}` `` | Encoded attestation data | [sdk/eas/src/schema.ts:133](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L133) |
1479
+ | <a id="expirationtime-1"></a> `expirationTime` | `bigint` | Expiration timestamp | [sdk/eas/src/schema.ts:127](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L127) |
1480
+ | <a id="recipient-1"></a> `recipient` | `` `0x${string}` `` | Recipient of the attestation | [sdk/eas/src/schema.ts:123](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L123) |
1481
+ | <a id="refuid-1"></a> `refUID` | `` `0x${string}` `` | Reference UID | [sdk/eas/src/schema.ts:131](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L131) |
1482
+ | <a id="revocable-1"></a> `revocable` | `boolean` | Whether this attestation can be revoked | [sdk/eas/src/schema.ts:129](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L129) |
1483
+ | <a id="schema"></a> `schema` | `` `0x${string}` `` | Schema UID | [sdk/eas/src/schema.ts:119](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L119) |
1484
+ | <a id="time"></a> `time` | `bigint` | Creation timestamp | [sdk/eas/src/schema.ts:125](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L125) |
1485
+ | <a id="uid"></a> `uid` | `` `0x${string}` `` | Attestation UID | [sdk/eas/src/schema.ts:117](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L117) |
1486
+ | <a id="value-1"></a> `value` | `bigint` | Value sent with the attestation | [sdk/eas/src/schema.ts:135](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L135) |
1483
1487
 
1484
1488
  ***
1485
1489
 
1486
1490
  #### AttestationRequest
1487
1491
 
1488
- Defined in: [sdk/eas/src/schema.ts:81](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L81)
1492
+ Defined in: [sdk/eas/src/schema.ts:81](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L81)
1489
1493
 
1490
1494
  Attestation request
1491
1495
 
@@ -1493,14 +1497,14 @@ Attestation request
1493
1497
 
1494
1498
  | Property | Type | Description | Defined in |
1495
1499
  | ------ | ------ | ------ | ------ |
1496
- | <a id="data-2"></a> `data` | [`AttestationData`](#attestationdata) | Attestation data | [sdk/eas/src/schema.ts:85](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L85) |
1497
- | <a id="schema-1"></a> `schema` | `` `0x${string}` `` | Schema UID to attest against | [sdk/eas/src/schema.ts:83](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L83) |
1500
+ | <a id="data-2"></a> `data` | [`AttestationData`](#attestationdata) | Attestation data | [sdk/eas/src/schema.ts:85](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L85) |
1501
+ | <a id="schema-1"></a> `schema` | `` `0x${string}` `` | Schema UID to attest against | [sdk/eas/src/schema.ts:83](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L83) |
1498
1502
 
1499
1503
  ***
1500
1504
 
1501
1505
  #### DeploymentResult
1502
1506
 
1503
- Defined in: [sdk/eas/src/schema.ts:167](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L167)
1507
+ Defined in: [sdk/eas/src/schema.ts:167](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L167)
1504
1508
 
1505
1509
  Contract deployment result
1506
1510
 
@@ -1508,16 +1512,16 @@ Contract deployment result
1508
1512
 
1509
1513
  | Property | Type | Description | Defined in |
1510
1514
  | ------ | ------ | ------ | ------ |
1511
- | <a id="easaddress"></a> `easAddress` | `` `0x${string}` `` | Deployed EAS contract address | [sdk/eas/src/schema.ts:169](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L169) |
1512
- | <a id="eastransactionhash"></a> `easTransactionHash?` | `` `0x${string}` `` | EAS deployment transaction hash (when address not immediately available) | [sdk/eas/src/schema.ts:173](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L173) |
1513
- | <a id="schemaregistryaddress"></a> `schemaRegistryAddress` | `` `0x${string}` `` | Deployed Schema Registry contract address | [sdk/eas/src/schema.ts:171](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L171) |
1514
- | <a id="schemaregistrytransactionhash"></a> `schemaRegistryTransactionHash?` | `` `0x${string}` `` | Schema Registry deployment transaction hash (when address not immediately available) | [sdk/eas/src/schema.ts:175](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L175) |
1515
+ | <a id="easaddress"></a> `easAddress` | `` `0x${string}` `` | Deployed EAS contract address | [sdk/eas/src/schema.ts:169](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L169) |
1516
+ | <a id="eastransactionhash"></a> `easTransactionHash?` | `` `0x${string}` `` | EAS deployment transaction hash (when address not immediately available) | [sdk/eas/src/schema.ts:173](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L173) |
1517
+ | <a id="schemaregistryaddress"></a> `schemaRegistryAddress` | `` `0x${string}` `` | Deployed Schema Registry contract address | [sdk/eas/src/schema.ts:171](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L171) |
1518
+ | <a id="schemaregistrytransactionhash"></a> `schemaRegistryTransactionHash?` | `` `0x${string}` `` | Schema Registry deployment transaction hash (when address not immediately available) | [sdk/eas/src/schema.ts:175](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L175) |
1515
1519
 
1516
1520
  ***
1517
1521
 
1518
1522
  #### GetAttestationsOptions
1519
1523
 
1520
- Defined in: [sdk/eas/src/schema.ts:151](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L151)
1524
+ Defined in: [sdk/eas/src/schema.ts:151](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L151)
1521
1525
 
1522
1526
  Options for retrieving attestations
1523
1527
 
@@ -1525,17 +1529,17 @@ Options for retrieving attestations
1525
1529
 
1526
1530
  | Property | Type | Description | Defined in |
1527
1531
  | ------ | ------ | ------ | ------ |
1528
- | <a id="attester-1"></a> `attester?` | `` `0x${string}` `` | Filter by attester address | [sdk/eas/src/schema.ts:159](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L159) |
1529
- | <a id="limit"></a> `limit?` | `number` | Maximum number of attestations to return | [sdk/eas/src/schema.ts:153](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L153) |
1530
- | <a id="offset"></a> `offset?` | `number` | Number of attestations to skip | [sdk/eas/src/schema.ts:155](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L155) |
1531
- | <a id="recipient-2"></a> `recipient?` | `` `0x${string}` `` | Filter by recipient address | [sdk/eas/src/schema.ts:161](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L161) |
1532
- | <a id="schema-2"></a> `schema?` | `` `0x${string}` `` | Filter by schema UID | [sdk/eas/src/schema.ts:157](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L157) |
1532
+ | <a id="attester-1"></a> `attester?` | `` `0x${string}` `` | Filter by attester address | [sdk/eas/src/schema.ts:159](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L159) |
1533
+ | <a id="limit"></a> `limit?` | `number` | Maximum number of attestations to return | [sdk/eas/src/schema.ts:153](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L153) |
1534
+ | <a id="offset"></a> `offset?` | `number` | Number of attestations to skip | [sdk/eas/src/schema.ts:155](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L155) |
1535
+ | <a id="recipient-2"></a> `recipient?` | `` `0x${string}` `` | Filter by recipient address | [sdk/eas/src/schema.ts:161](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L161) |
1536
+ | <a id="schema-2"></a> `schema?` | `` `0x${string}` `` | Filter by schema UID | [sdk/eas/src/schema.ts:157](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L157) |
1533
1537
 
1534
1538
  ***
1535
1539
 
1536
1540
  #### GetSchemasOptions
1537
1541
 
1538
- Defined in: [sdk/eas/src/schema.ts:141](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L141)
1542
+ Defined in: [sdk/eas/src/schema.ts:141](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L141)
1539
1543
 
1540
1544
  Options for retrieving schemas
1541
1545
 
@@ -1543,14 +1547,14 @@ Options for retrieving schemas
1543
1547
 
1544
1548
  | Property | Type | Description | Defined in |
1545
1549
  | ------ | ------ | ------ | ------ |
1546
- | <a id="limit-1"></a> `limit?` | `number` | Maximum number of schemas to return | [sdk/eas/src/schema.ts:143](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L143) |
1547
- | <a id="offset-1"></a> `offset?` | `number` | Number of schemas to skip | [sdk/eas/src/schema.ts:145](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L145) |
1550
+ | <a id="limit-1"></a> `limit?` | `number` | Maximum number of schemas to return | [sdk/eas/src/schema.ts:143](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L143) |
1551
+ | <a id="offset-1"></a> `offset?` | `number` | Number of schemas to skip | [sdk/eas/src/schema.ts:145](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L145) |
1548
1552
 
1549
1553
  ***
1550
1554
 
1551
1555
  #### SchemaData
1552
1556
 
1553
- Defined in: [sdk/eas/src/schema.ts:101](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L101)
1557
+ Defined in: [sdk/eas/src/schema.ts:101](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L101)
1554
1558
 
1555
1559
  Schema information
1556
1560
 
@@ -1558,16 +1562,16 @@ Schema information
1558
1562
 
1559
1563
  | Property | Type | Description | Defined in |
1560
1564
  | ------ | ------ | ------ | ------ |
1561
- | <a id="resolver"></a> `resolver` | `` `0x${string}` `` | Resolver contract address | [sdk/eas/src/schema.ts:105](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L105) |
1562
- | <a id="revocable-2"></a> `revocable` | `boolean` | Whether attestations can be revoked | [sdk/eas/src/schema.ts:107](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L107) |
1563
- | <a id="schema-3"></a> `schema` | `string` | Schema string | [sdk/eas/src/schema.ts:109](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L109) |
1564
- | <a id="uid-1"></a> `uid` | `` `0x${string}` `` | Schema UID | [sdk/eas/src/schema.ts:103](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L103) |
1565
+ | <a id="resolver"></a> `resolver` | `` `0x${string}` `` | Resolver contract address | [sdk/eas/src/schema.ts:105](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L105) |
1566
+ | <a id="revocable-2"></a> `revocable` | `boolean` | Whether attestations can be revoked | [sdk/eas/src/schema.ts:107](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L107) |
1567
+ | <a id="schema-3"></a> `schema` | `string` | Schema string | [sdk/eas/src/schema.ts:109](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L109) |
1568
+ | <a id="uid-1"></a> `uid` | `` `0x${string}` `` | Schema UID | [sdk/eas/src/schema.ts:103](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L103) |
1565
1569
 
1566
1570
  ***
1567
1571
 
1568
1572
  #### SchemaField
1569
1573
 
1570
- Defined in: [sdk/eas/src/schema.ts:32](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L32)
1574
+ Defined in: [sdk/eas/src/schema.ts:32](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L32)
1571
1575
 
1572
1576
  Represents a single field in an EAS schema.
1573
1577
 
@@ -1575,15 +1579,15 @@ Represents a single field in an EAS schema.
1575
1579
 
1576
1580
  | Property | Type | Description | Defined in |
1577
1581
  | ------ | ------ | ------ | ------ |
1578
- | <a id="description"></a> `description?` | `string` | Optional description of the field's purpose | [sdk/eas/src/schema.ts:38](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L38) |
1579
- | <a id="name"></a> `name` | `string` | The name of the field | [sdk/eas/src/schema.ts:34](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L34) |
1580
- | <a id="type"></a> `type` | `"string"` \| `"address"` \| `"bool"` \| `"bytes"` \| `"bytes32"` \| `"uint256"` \| `"int256"` \| `"uint8"` \| `"int8"` | The Solidity type of the field | [sdk/eas/src/schema.ts:36](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L36) |
1582
+ | <a id="description"></a> `description?` | `string` | Optional description of the field's purpose | [sdk/eas/src/schema.ts:38](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L38) |
1583
+ | <a id="name"></a> `name` | `string` | The name of the field | [sdk/eas/src/schema.ts:34](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L34) |
1584
+ | <a id="type"></a> `type` | `"string"` \| `"address"` \| `"bool"` \| `"bytes"` \| `"bytes32"` \| `"uint256"` \| `"int256"` \| `"uint8"` \| `"int8"` | The Solidity type of the field | [sdk/eas/src/schema.ts:36](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L36) |
1581
1585
 
1582
1586
  ***
1583
1587
 
1584
1588
  #### SchemaRequest
1585
1589
 
1586
- Defined in: [sdk/eas/src/schema.ts:49](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L49)
1590
+ Defined in: [sdk/eas/src/schema.ts:49](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L49)
1587
1591
 
1588
1592
  Schema registration request
1589
1593
 
@@ -1591,16 +1595,16 @@ Schema registration request
1591
1595
 
1592
1596
  | Property | Type | Description | Defined in |
1593
1597
  | ------ | ------ | ------ | ------ |
1594
- | <a id="fields"></a> `fields?` | [`SchemaField`](#schemafield)[] | Schema fields (alternative to schema string) | [sdk/eas/src/schema.ts:51](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L51) |
1595
- | <a id="resolver-1"></a> `resolver` | `` `0x${string}` `` | Resolver contract address (use ZERO_ADDRESS for no resolver) | [sdk/eas/src/schema.ts:55](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L55) |
1596
- | <a id="revocable-3"></a> `revocable` | `boolean` | Whether attestations using this schema can be revoked | [sdk/eas/src/schema.ts:57](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L57) |
1597
- | <a id="schema-4"></a> `schema?` | `string` | Raw schema string (alternative to fields) | [sdk/eas/src/schema.ts:53](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L53) |
1598
+ | <a id="fields"></a> `fields?` | [`SchemaField`](#schemafield)[] | Schema fields (alternative to schema string) | [sdk/eas/src/schema.ts:51](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L51) |
1599
+ | <a id="resolver-1"></a> `resolver` | `` `0x${string}` `` | Resolver contract address (use ZERO_ADDRESS for no resolver) | [sdk/eas/src/schema.ts:55](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L55) |
1600
+ | <a id="revocable-3"></a> `revocable` | `boolean` | Whether attestations using this schema can be revoked | [sdk/eas/src/schema.ts:57](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L57) |
1601
+ | <a id="schema-4"></a> `schema?` | `string` | Raw schema string (alternative to fields) | [sdk/eas/src/schema.ts:53](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L53) |
1598
1602
 
1599
1603
  ***
1600
1604
 
1601
1605
  #### TransactionResult
1602
1606
 
1603
- Defined in: [sdk/eas/src/schema.ts:91](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L91)
1607
+ Defined in: [sdk/eas/src/schema.ts:91](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L91)
1604
1608
 
1605
1609
  Transaction result
1606
1610
 
@@ -1608,8 +1612,8 @@ Transaction result
1608
1612
 
1609
1613
  | Property | Type | Description | Defined in |
1610
1614
  | ------ | ------ | ------ | ------ |
1611
- | <a id="hash"></a> `hash` | `` `0x${string}` `` | Transaction hash | [sdk/eas/src/schema.ts:93](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L93) |
1612
- | <a id="success"></a> `success` | `boolean` | Whether the transaction was successful | [sdk/eas/src/schema.ts:95](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L95) |
1615
+ | <a id="hash"></a> `hash` | `` `0x${string}` `` | Transaction hash | [sdk/eas/src/schema.ts:93](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L93) |
1616
+ | <a id="success"></a> `success` | `boolean` | Whether the transaction was successful | [sdk/eas/src/schema.ts:95](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L95) |
1613
1617
 
1614
1618
  ### Type Aliases
1615
1619
 
@@ -1617,7 +1621,7 @@ Transaction result
1617
1621
 
1618
1622
  > **EASClientOptions** = `object`
1619
1623
 
1620
- Defined in: [sdk/eas/src/schema.ts:44](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L44)
1624
+ Defined in: [sdk/eas/src/schema.ts:44](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L44)
1621
1625
 
1622
1626
  Configuration options for the EAS client
1623
1627
 
@@ -1625,11 +1629,11 @@ Configuration options for the EAS client
1625
1629
 
1626
1630
  | Name | Type | Default value | Description | Defined in |
1627
1631
  | ------ | ------ | ------ | ------ | ------ |
1628
- | <a id="accesstoken"></a> `accessToken?` | `string` | - | The application access token | [sdk/eas/src/utils/validation.ts:21](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L21) |
1629
- | <a id="debug"></a> `debug?` | `boolean` | - | Whether to enable debug mode | [sdk/eas/src/utils/validation.ts:33](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L33) |
1630
- | <a id="eascontractaddress"></a> `easContractAddress?` | `` `0x${string}` `` | - | The EAS contract address | [sdk/eas/src/utils/validation.ts:25](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L25) |
1631
- | <a id="instance"></a> `instance` | `string` | `UrlSchema` | The EAS instance URL | [sdk/eas/src/utils/validation.ts:17](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L17) |
1632
- | <a id="schemaregistrycontractaddress"></a> `schemaRegistryContractAddress?` | `` `0x${string}` `` | - | The schema registry contract address | [sdk/eas/src/utils/validation.ts:29](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L29) |
1632
+ | <a id="accesstoken"></a> `accessToken?` | `string` | - | The application access token | [sdk/eas/src/utils/validation.ts:21](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L21) |
1633
+ | <a id="debug"></a> `debug?` | `boolean` | - | Whether to enable debug mode | [sdk/eas/src/utils/validation.ts:33](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L33) |
1634
+ | <a id="eascontractaddress"></a> `easContractAddress?` | `` `0x${string}` `` | - | The EAS contract address | [sdk/eas/src/utils/validation.ts:25](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L25) |
1635
+ | <a id="instance"></a> `instance` | `string` | `UrlSchema` | The EAS instance URL | [sdk/eas/src/utils/validation.ts:17](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L17) |
1636
+ | <a id="schemaregistrycontractaddress"></a> `schemaRegistryContractAddress?` | `` `0x${string}` `` | - | The schema registry contract address | [sdk/eas/src/utils/validation.ts:29](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L29) |
1633
1637
 
1634
1638
  ### Variables
1635
1639
 
@@ -1637,7 +1641,7 @@ Configuration options for the EAS client
1637
1641
 
1638
1642
  > `const` **EAS\_FIELD\_TYPES**: `object`
1639
1643
 
1640
- Defined in: [sdk/eas/src/schema.ts:15](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L15)
1644
+ Defined in: [sdk/eas/src/schema.ts:15](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L15)
1641
1645
 
1642
1646
  Supported field types for EAS schema fields.
1643
1647
  Maps to the Solidity types that can be used in EAS schemas.
@@ -1646,15 +1650,15 @@ Maps to the Solidity types that can be used in EAS schemas.
1646
1650
 
1647
1651
  | Name | Type | Default value | Defined in |
1648
1652
  | ------ | ------ | ------ | ------ |
1649
- | <a id="address"></a> `address` | `"address"` | `"address"` | [sdk/eas/src/schema.ts:17](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L17) |
1650
- | <a id="bool"></a> `bool` | `"bool"` | `"bool"` | [sdk/eas/src/schema.ts:18](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L18) |
1651
- | <a id="bytes"></a> `bytes` | `"bytes"` | `"bytes"` | [sdk/eas/src/schema.ts:19](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L19) |
1652
- | <a id="bytes32"></a> `bytes32` | `"bytes32"` | `"bytes32"` | [sdk/eas/src/schema.ts:20](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L20) |
1653
- | <a id="int256"></a> `int256` | `"int256"` | `"int256"` | [sdk/eas/src/schema.ts:22](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L22) |
1654
- | <a id="int8"></a> `int8` | `"int8"` | `"int8"` | [sdk/eas/src/schema.ts:24](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L24) |
1655
- | <a id="string"></a> `string` | `"string"` | `"string"` | [sdk/eas/src/schema.ts:16](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L16) |
1656
- | <a id="uint256"></a> `uint256` | `"uint256"` | `"uint256"` | [sdk/eas/src/schema.ts:21](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L21) |
1657
- | <a id="uint8"></a> `uint8` | `"uint8"` | `"uint8"` | [sdk/eas/src/schema.ts:23](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L23) |
1653
+ | <a id="address"></a> `address` | `"address"` | `"address"` | [sdk/eas/src/schema.ts:17](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L17) |
1654
+ | <a id="bool"></a> `bool` | `"bool"` | `"bool"` | [sdk/eas/src/schema.ts:18](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L18) |
1655
+ | <a id="bytes"></a> `bytes` | `"bytes"` | `"bytes"` | [sdk/eas/src/schema.ts:19](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L19) |
1656
+ | <a id="bytes32"></a> `bytes32` | `"bytes32"` | `"bytes32"` | [sdk/eas/src/schema.ts:20](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L20) |
1657
+ | <a id="int256"></a> `int256` | `"int256"` | `"int256"` | [sdk/eas/src/schema.ts:22](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L22) |
1658
+ | <a id="int8"></a> `int8` | `"int8"` | `"int8"` | [sdk/eas/src/schema.ts:24](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L24) |
1659
+ | <a id="string"></a> `string` | `"string"` | `"string"` | [sdk/eas/src/schema.ts:16](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L16) |
1660
+ | <a id="uint256"></a> `uint256` | `"uint256"` | `"uint256"` | [sdk/eas/src/schema.ts:21](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L21) |
1661
+ | <a id="uint8"></a> `uint8` | `"uint8"` | `"uint8"` | [sdk/eas/src/schema.ts:23](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L23) |
1658
1662
 
1659
1663
  ***
1660
1664
 
@@ -1662,7 +1666,7 @@ Maps to the Solidity types that can be used in EAS schemas.
1662
1666
 
1663
1667
  > `const` **EASClientOptionsSchema**: `ZodObject`\<[`EASClientOptions`](#easclientoptions)\>
1664
1668
 
1665
- Defined in: [sdk/eas/src/utils/validation.ts:13](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/utils/validation.ts#L13)
1669
+ Defined in: [sdk/eas/src/utils/validation.ts:13](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/utils/validation.ts#L13)
1666
1670
 
1667
1671
  Zod schema for EASClientOptions.
1668
1672
 
@@ -1672,7 +1676,7 @@ Zod schema for EASClientOptions.
1672
1676
 
1673
1677
  > `const` **ZERO\_ADDRESS**: `"0x0000000000000000000000000000000000000000"` = `zeroAddress`
1674
1678
 
1675
- Defined in: [sdk/eas/src/schema.ts:8](https://github.com/settlemint/sdk/blob/v2.5.5/sdk/eas/src/schema.ts#L8)
1679
+ Defined in: [sdk/eas/src/schema.ts:8](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/eas/src/schema.ts#L8)
1676
1680
 
1677
1681
  Common address constants
1678
1682
 
@@ -1 +1 @@
1
- {"version":3,"file":"eas.js","names":["graphql: PortalClient[\"graphql\"]","options: EASClientOptions","deployerAddress: Address","forwarderAddress?: Address","gasLimit?: string","request: SchemaRequest","fromAddress: Address","request: AttestationRequest","requests: AttestationRequest[]","schemaUID: Hex","attestationUID: Hex","value?: bigint","uid: Hex","_options?: GetSchemasOptions","_options?: GetAttestationsOptions","data: Hex","fields: SchemaField[]"],"sources":["../../src/portal/operations.ts","../../src/schema.ts","../../src/utils/validation.ts","../../src/eas.ts"],"sourcesContent":["import type { PortalClient } from \"./portal-client.js\";\n\nexport const GraphQLOperations = {\n mutations: {\n deploySchemaRegistry: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEASSchemaRegistry(\n $from: String!\n $constructorArguments: DeployContractEASSchemaRegistryInput!\n $gasLimit: String!\n ) {\n DeployContractEASSchemaRegistry(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n deployEAS: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEAS($from: String!, $constructorArguments: DeployContractEASInput!, $gasLimit: String!) {\n DeployContractEAS(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n registerSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASSchemaRegistryRegister(\n $address: String!\n $from: String!\n $input: EASSchemaRegistryRegisterInput!\n $gasLimit: String!\n ) {\n EASSchemaRegistryRegister(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n attest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASAttest($address: String!, $from: String!, $input: EASAttestInput!, $gasLimit: String!) {\n EASAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n multiAttest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASMultiAttest($address: String!, $from: String!, $input: EASMultiAttestInput!, $gasLimit: String!) {\n EASMultiAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n revoke: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASRevoke($address: String!, $from: String!, $input: EASRevokeInput!, $gasLimit: String!) {\n EASRevoke(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n },\n\n queries: {\n getSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASSchemaRegistryGetSchema($address: String!, $uid: String!) {\n EASSchemaRegistry(address: $address) {\n getSchema(uid: $uid) {\n uid\n resolver\n revocable\n schema\n }\n }\n }`),\n\n getAttestation: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetAttestation($address: String!, $uid: String!) {\n EAS(address: $address) {\n getAttestation(uid: $uid) {\n uid\n schema\n attester\n recipient\n time\n expirationTime\n revocable\n refUID\n data\n revocationTime\n }\n }\n }`),\n\n isAttestationValid: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASIsAttestationValid($address: String!, $uid: String!) {\n EAS(address: $address) {\n isAttestationValid(uid: $uid)\n }\n }`),\n\n getTimestamp: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetTimestamp($address: String!, $data: String!) {\n EAS(address: $address) {\n getTimestamp(data: $data)\n }\n }`),\n },\n};\n","import { type Address, type Hex, zeroAddress } from \"viem\";\nimport type { z } from \"zod\";\nimport type { EASClientOptionsSchema } from \"./utils/validation.js\";\n\n/**\n * Common address constants\n */\nexport const ZERO_ADDRESS = zeroAddress;\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\" as Hex;\n\n/**\n * Supported field types for EAS schema fields.\n * Maps to the Solidity types that can be used in EAS schemas.\n */\nexport const EAS_FIELD_TYPES = {\n string: \"string\",\n address: \"address\",\n bool: \"bool\",\n bytes: \"bytes\",\n bytes32: \"bytes32\",\n uint256: \"uint256\",\n int256: \"int256\",\n uint8: \"uint8\",\n int8: \"int8\",\n} as const;\n\nexport type EASFieldType = keyof typeof EAS_FIELD_TYPES;\n\n/**\n * Represents a single field in an EAS schema.\n */\nexport interface SchemaField {\n /** The name of the field */\n name: string;\n /** The Solidity type of the field */\n type: EASFieldType;\n /** Optional description of the field's purpose */\n description?: string;\n}\n\n/**\n * Configuration options for the EAS client\n */\nexport type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;\n\n/**\n * Schema registration request\n */\nexport interface SchemaRequest {\n /** Schema fields (alternative to schema string) */\n fields?: SchemaField[];\n /** Raw schema string (alternative to fields) */\n schema?: string;\n /** Resolver contract address (use ZERO_ADDRESS for no resolver) */\n resolver: Address;\n /** Whether attestations using this schema can be revoked */\n revocable: boolean;\n}\n\n/**\n * Attestation data structure\n */\nexport interface AttestationData {\n /** Recipient of the attestation */\n recipient: Address;\n /** Expiration time (0 for no expiration) */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID (use ZERO_BYTES32 for no reference) */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Attestation request\n */\nexport interface AttestationRequest {\n /** Schema UID to attest against */\n schema: Hex;\n /** Attestation data */\n data: AttestationData;\n}\n\n/**\n * Transaction result\n */\nexport interface TransactionResult {\n /** Transaction hash */\n hash: Hex;\n /** Whether the transaction was successful */\n success: boolean;\n}\n\n/**\n * Schema information\n */\nexport interface SchemaData {\n /** Schema UID */\n uid: Hex;\n /** Resolver contract address */\n resolver: Address;\n /** Whether attestations can be revoked */\n revocable: boolean;\n /** Schema string */\n schema: string;\n}\n\n/**\n * Attestation information\n */\nexport interface AttestationInfo {\n /** Attestation UID */\n uid: Hex;\n /** Schema UID */\n schema: Hex;\n /** Address that created the attestation */\n attester: Address;\n /** Recipient of the attestation */\n recipient: Address;\n /** Creation timestamp */\n time: bigint;\n /** Expiration timestamp */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Options for retrieving schemas\n */\nexport interface GetSchemasOptions {\n /** Maximum number of schemas to return */\n limit?: number;\n /** Number of schemas to skip */\n offset?: number;\n}\n\n/**\n * Options for retrieving attestations\n */\nexport interface GetAttestationsOptions {\n /** Maximum number of attestations to return */\n limit?: number;\n /** Number of attestations to skip */\n offset?: number;\n /** Filter by schema UID */\n schema?: Hex;\n /** Filter by attester address */\n attester?: Address;\n /** Filter by recipient address */\n recipient?: Address;\n}\n\n/**\n * Contract deployment result\n */\nexport interface DeploymentResult {\n /** Deployed EAS contract address */\n easAddress: Address;\n /** Deployed Schema Registry contract address */\n schemaRegistryAddress: Address;\n /** EAS deployment transaction hash (when address not immediately available) */\n easTransactionHash?: Hex;\n /** Schema Registry deployment transaction hash (when address not immediately available) */\n schemaRegistryTransactionHash?: Hex;\n}\n\n/**\n * @deprecated Use SchemaRequest instead\n * @internal\n */\nexport interface RegisterSchemaOptions extends SchemaRequest {}\n","import { ApplicationAccessTokenSchema, UrlSchema } from \"@settlemint/sdk-utils/validation\";\nimport { type Address, isAddress } from \"viem\";\nimport { z } from \"zod\";\n\nconst ethAddressSchema = z.custom<Address>(\n (val) => typeof val === \"string\" && isAddress(val),\n \"Invalid Ethereum address\",\n);\n\n/**\n * Zod schema for EASClientOptions.\n */\nexport const EASClientOptionsSchema = z.object({\n /**\n * The EAS instance URL\n */\n instance: UrlSchema,\n /**\n * The application access token\n */\n accessToken: ApplicationAccessTokenSchema.optional(),\n /**\n * The EAS contract address\n */\n easContractAddress: ethAddressSchema.optional(),\n /**\n * The schema registry contract address\n */\n schemaRegistryContractAddress: ethAddressSchema.optional(),\n /**\n * Whether to enable debug mode\n */\n debug: z.boolean().optional(),\n});\n","import { createPortalClient, waitForTransactionReceipt } from \"@settlemint/sdk-portal\";\nimport { createLogger, requestLogger } from \"@settlemint/sdk-utils/logging\";\nimport { validate } from \"@settlemint/sdk-utils/validation\";\nimport type { Address, Hex } from \"viem\";\nimport { GraphQLOperations } from \"./portal/operations.js\";\nimport type { PortalClient } from \"./portal/portal-client.js\";\nimport type { introspection } from \"./portal/portal-env.d.ts\";\nimport {\n type AttestationInfo,\n type AttestationRequest,\n type DeploymentResult,\n type EASClientOptions,\n type GetAttestationsOptions,\n type GetSchemasOptions,\n type SchemaData,\n type SchemaField,\n type SchemaRequest,\n type TransactionResult,\n ZERO_ADDRESS,\n} from \"./schema.js\";\nimport { EASClientOptionsSchema } from \"./utils/validation.js\";\n\nconst LOGGER = createLogger();\n\nconst DEFAULT_GAS_LIMIT = \"0x3d0900\";\n\n/**\n * Main EAS client class for interacting with Ethereum Attestation Service via Portal\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Deploy EAS contracts\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * console.log(\"EAS deployed at:\", deployment.easAddress);\n * ```\n */\nexport class EASClient {\n private readonly options: EASClientOptions;\n private readonly portalClient: PortalClient[\"client\"];\n private readonly portalGraphql: PortalClient[\"graphql\"];\n private deployedAddresses?: DeploymentResult;\n\n /**\n * Create a new EAS client instance\n *\n * @param options - Configuration options for the EAS client\n */\n constructor(options: EASClientOptions) {\n this.options = validate(EASClientOptionsSchema, options);\n\n const { client: portalClient, graphql: portalGraphql } = createPortalClient<{\n introspection: introspection;\n disableMasking: true;\n scalars: {\n // Change unknown to the type you are using to store metadata\n JSON: unknown;\n };\n }>(\n {\n instance: this.options.instance,\n accessToken: this.options.accessToken,\n },\n {\n fetch: requestLogger(LOGGER, \"portal\", fetch) as typeof fetch,\n },\n );\n\n this.portalClient = portalClient;\n this.portalGraphql = portalGraphql;\n }\n\n /**\n * Deploy EAS contracts via Portal\n *\n * @param deployerAddress - The address that will deploy the contracts\n * @param forwarderAddress - Optional trusted forwarder address (defaults to zero address)\n * @param gasLimit - Optional gas limit for deployment transactions (defaults to \"0x7a1200\")\n * @returns Promise resolving to deployment result with contract addresses and transaction hashes\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const deployment = await easClient.deploy(\n * \"0x1234567890123456789012345678901234567890\", // deployer address\n * \"0x0000000000000000000000000000000000000000\", // forwarder (optional)\n * \"0x7a1200\" // gas limit (optional)\n * );\n *\n * console.log(\"Schema Registry:\", deployment.schemaRegistryAddress);\n * console.log(\"EAS Contract:\", deployment.easAddress);\n * ```\n */\n public async deploy(\n deployerAddress: Address,\n forwarderAddress?: Address,\n gasLimit?: string,\n ): Promise<DeploymentResult> {\n const defaultForwarder = forwarderAddress || ZERO_ADDRESS;\n const defaultGasLimit = gasLimit || \"0x7a1200\";\n\n try {\n // Deploy Schema Registry first\n const schemaRegistryResponse = await this.portalClient.request(\n GraphQLOperations.mutations.deploySchemaRegistry(this.portalGraphql),\n {\n from: deployerAddress,\n constructorArguments: {\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n },\n );\n\n if (!schemaRegistryResponse.DeployContractEASSchemaRegistry?.transactionHash) {\n throw new Error(\"Schema Registry deployment failed - no transaction hash returned\");\n }\n\n const schemaRegistryTxHash = schemaRegistryResponse.DeployContractEASSchemaRegistry.transactionHash;\n\n // Wait for Schema Registry deployment and get contract address\n const schemaRegistryTransaction = await waitForTransactionReceipt(schemaRegistryTxHash as Hex, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!schemaRegistryTransaction?.receipt?.contractAddress) {\n throw new Error(\"Schema Registry deployment failed - could not get contract address from transaction receipt.\");\n }\n\n const schemaRegistryAddress = schemaRegistryTransaction.receipt.contractAddress;\n\n // Deploy EAS contract with correct Schema Registry address\n const easResponse = await this.portalClient.request(GraphQLOperations.mutations.deployEAS(this.portalGraphql), {\n from: deployerAddress,\n constructorArguments: {\n registry: schemaRegistryAddress,\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n });\n if (!easResponse.DeployContractEAS?.transactionHash) {\n throw new Error(\"EAS deployment failed - no transaction hash returned\");\n }\n\n const easTxHash = easResponse.DeployContractEAS.transactionHash as Hex;\n\n // Wait for EAS deployment and get contract address\n const easTransaction = await waitForTransactionReceipt(easTxHash, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!easTransaction?.receipt?.contractAddress) {\n throw new Error(\"EAS deployment failed - could not get contract address from transaction receipt.\");\n }\n const easAddress = easTransaction.receipt.contractAddress;\n\n this.deployedAddresses = {\n easAddress,\n schemaRegistryAddress,\n easTransactionHash: easTxHash as Hex,\n schemaRegistryTransactionHash: schemaRegistryTxHash as Hex,\n };\n\n return this.deployedAddresses;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to deploy EAS contracts: ${error.message}`);\n }\n }\n\n /**\n * Register a new schema in the EAS Schema Registry\n *\n * @param request - Schema registration request containing schema definition\n * @param fromAddress - Address that will register the schema\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const schemaResult = await easClient.registerSchema(\n * {\n * schema: \"uint256 eventId, uint8 voteIndex\",\n * resolver: \"0x0000000000000000000000000000000000000000\",\n * revocable: true\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Schema registered:\", schemaResult.hash);\n * ```\n */\n public async registerSchema(\n request: SchemaRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n let schemaString = request.schema;\n if (request.fields && !schemaString) {\n schemaString = this.buildSchemaString(request.fields);\n }\n\n if (!schemaString) {\n throw new Error(\"Schema string is required. Provide either 'schema' or 'fields'.\");\n }\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.registerSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n from: fromAddress,\n input: {\n schema: schemaString,\n resolver: request.resolver,\n revocable: request.revocable,\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASSchemaRegistryRegister?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to register schema: ${error.message}`);\n }\n }\n\n /**\n * Create an attestation\n *\n * @param request - Attestation request containing schema and data\n * @param fromAddress - Address that will create the attestation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const attestationResult = await easClient.attest(\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0), // No expiration\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\", // ABI-encoded data\n * value: BigInt(0)\n * }\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Attestation created:\", attestationResult.hash);\n * ```\n */\n public async attest(\n request: AttestationRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.attest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n request: {\n schema: request.schema,\n data: {\n recipient: request.data.recipient,\n expirationTime: request.data.expirationTime.toString(),\n revocable: request.data.revocable,\n refUID: request.data.refUID,\n data: request.data.data,\n value: request.data.value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create attestation: ${error.message}`);\n }\n }\n\n /**\n * Create multiple attestations in a single transaction\n *\n * @param requests - Array of attestation requests\n * @param fromAddress - Address that will create the attestations\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const multiAttestResult = await easClient.multiAttest(\n * [\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0),\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\",\n * value: BigInt(0)\n * }\n * },\n * {\n * schema: \"0x5678901234567890123456789012345678901234567890123456789012345678\",\n * data: {\n * recipient: \"0x5678901234567890123456789012345678901234\",\n * expirationTime: BigInt(0),\n * revocable: false,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x5678\",\n * value: BigInt(0)\n * }\n * }\n * ],\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Multiple attestations created:\", multiAttestResult.hash);\n * ```\n */\n public async multiAttest(\n requests: AttestationRequest[],\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n if (requests.length === 0) {\n throw new Error(\"At least one attestation request is required\");\n }\n\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.multiAttest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n multiRequests: requests.map((req) => ({\n schema: req.schema,\n data: [\n {\n recipient: req.data.recipient,\n expirationTime: req.data.expirationTime.toString(),\n revocable: req.data.revocable,\n refUID: req.data.refUID,\n data: req.data.data,\n value: req.data.value?.toString() || \"0\",\n },\n ],\n })),\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASMultiAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create multiple attestations: ${error.message}`);\n }\n }\n\n /**\n * Revoke an existing attestation\n *\n * @param schemaUID - UID of the schema used for the attestation\n * @param attestationUID - UID of the attestation to revoke\n * @param fromAddress - Address that will revoke the attestation\n * @param value - Optional ETH value to send with the revocation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const revokeResult = await easClient.revoke(\n * \"0x1234567890123456789012345678901234567890123456789012345678901234\", // schema UID\n * \"0x5678901234567890123456789012345678901234567890123456789012345678\", // attestation UID\n * \"0x1234567890123456789012345678901234567890\", // from address\n * BigInt(0) // value (optional)\n * );\n *\n * console.log(\"Attestation revoked:\", revokeResult.hash);\n * ```\n */\n public async revoke(\n schemaUID: Hex,\n attestationUID: Hex,\n fromAddress: Address,\n value?: bigint,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.revoke(this.portalGraphql), {\n address: this.getEASAddress(),\n from: fromAddress,\n input: {\n request: {\n schema: schemaUID,\n data: {\n uid: attestationUID,\n value: value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASRevoke?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to revoke attestation: ${error.message}`);\n }\n }\n\n /**\n * Get a schema by UID\n */\n public async getSchema(uid: Hex): Promise<SchemaData> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n uid: uid,\n });\n\n const schemaResult = response.EASSchemaRegistry?.getSchema;\n\n if (!schemaResult) {\n throw new Error(`Schema not found: ${uid}`);\n }\n\n return {\n uid: schemaResult.uid as Hex,\n resolver: schemaResult.resolver as Address,\n revocable: Boolean(schemaResult.revocable),\n schema: schemaResult.schema || \"\",\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get schema: ${error.message}`);\n }\n }\n\n /**\n * Get all schemas with pagination\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all schemas.\n * Consider using getSchema() for individual schema lookups.\n */\n public async getSchemas(_options?: GetSchemasOptions): Promise<SchemaData[]> {\n throw new Error(\n \"Schema listing not implemented yet. Portal's direct contract queries don't support listing all schemas. Use getSchema() for individual schema lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Get an attestation by UID\n */\n public async getAttestation(uid: Hex): Promise<AttestationInfo> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getAttestation(this.portalGraphql), {\n address: easAddress,\n uid: uid,\n });\n\n const attestationResult = response.EAS?.getAttestation;\n\n if (!attestationResult) {\n throw new Error(`Attestation not found: ${uid}`);\n }\n\n return {\n uid: attestationResult.uid as Hex,\n schema: attestationResult.schema as Hex,\n attester: attestationResult.attester as Address,\n recipient: attestationResult.recipient as Address,\n time: attestationResult.time ? BigInt(attestationResult.time) : BigInt(0),\n expirationTime: attestationResult.expirationTime ? BigInt(attestationResult.expirationTime) : BigInt(0),\n revocable: Boolean(attestationResult.revocable),\n refUID: attestationResult.refUID as Hex,\n data: attestationResult.data as Hex,\n value: BigInt(0), // Note: Portal schema doesn't include value, defaulting to 0\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get attestation: ${error.message}`);\n }\n }\n\n /**\n * Get attestations with pagination and filtering\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all attestations.\n * Consider using getAttestation() for individual attestation lookups.\n */\n public async getAttestations(_options?: GetAttestationsOptions): Promise<AttestationInfo[]> {\n throw new Error(\n \"Attestation listing not implemented yet. Portal's direct contract queries don't support listing all attestations. Use getAttestation() for individual attestation lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Check if an attestation is valid\n */\n public async isValidAttestation(uid: Hex): Promise<boolean> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(\n GraphQLOperations.queries.isAttestationValid(this.portalGraphql),\n {\n address: easAddress,\n uid: uid,\n },\n );\n\n return response.EAS?.isAttestationValid ?? false;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to check attestation validity: ${error.message}`);\n }\n }\n\n /**\n * Get the timestamp for specific data\n *\n * @param data - The data to get timestamp for\n * @returns The timestamp when the data was timestamped\n */\n public async getTimestamp(data: Hex): Promise<bigint> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getTimestamp(this.portalGraphql), {\n address: easAddress,\n data: data,\n });\n\n const timestampResult = response.EAS?.getTimestamp;\n\n if (timestampResult === undefined || timestampResult === null) {\n throw new Error(`No timestamp found for data: ${data}`);\n }\n\n return BigInt(timestampResult);\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get timestamp: ${error.message}`);\n }\n }\n\n /**\n * Get client configuration\n */\n public getOptions(): EASClientOptions {\n return { ...this.options };\n }\n\n /**\n * Get the Portal client instance for advanced operations\n */\n public getPortalClient(): PortalClient[\"client\"] {\n return this.portalClient;\n }\n\n /**\n * Get current contract addresses\n */\n public getContractAddresses(): { easAddress?: Address; schemaRegistryAddress?: Address } {\n return {\n easAddress: this.options.easContractAddress || this.deployedAddresses?.easAddress,\n schemaRegistryAddress:\n this.options.schemaRegistryContractAddress || this.deployedAddresses?.schemaRegistryAddress,\n };\n }\n\n private getEASAddress(): Address {\n if (this.options.easContractAddress) {\n return this.options.easContractAddress;\n }\n if (this.deployedAddresses?.easAddress) {\n return this.deployedAddresses.easAddress;\n }\n throw new Error(\"EAS contract address not available. Please provide it in options or deploy contracts first.\");\n }\n\n private getSchemaRegistryAddress(): Address {\n if (this.options.schemaRegistryContractAddress) {\n return this.options.schemaRegistryContractAddress;\n }\n if (this.deployedAddresses?.schemaRegistryAddress) {\n return this.deployedAddresses.schemaRegistryAddress;\n }\n throw new Error(\n \"Schema Registry contract address not available. Please provide it in options or deploy contracts first.\",\n );\n }\n\n private buildSchemaString(fields: SchemaField[]): string {\n return fields.map((field) => `${field.type} ${field.name}`).join(\", \");\n }\n}\n\n/**\n * Create an EAS client instance\n *\n * @param options - Configuration options for the EAS client\n * @returns EAS client instance\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Use the client\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * ```\n */\nexport function createEASClient(options: EASClientOptions): EASClient {\n return new EASClient(options);\n}\n\n// Re-export GraphQL operations for advanced usage\nexport { GraphQLOperations } from \"./portal/operations.js\";\n// Re-export types and constants\nexport type {\n AttestationData,\n AttestationInfo,\n AttestationRequest,\n DeploymentResult,\n EASClientOptions,\n EASFieldType,\n GetAttestationsOptions,\n GetSchemasOptions,\n RegisterSchemaOptions,\n SchemaData,\n SchemaField,\n SchemaRequest,\n TransactionResult,\n} from \"./schema.js\";\nexport { EAS_FIELD_TYPES, ZERO_ADDRESS, ZERO_BYTES32 } from \"./schema.js\";\n// Re-export validation utilities\nexport { EASClientOptionsSchema } from \"./utils/validation.js\";\n"],"mappings":";;;;;;;;AAEA,MAAa,oBAAoB;CAC/B,WAAW;EACT,sBAAsB,CAACA,YACrB,SAAS;;;;;;;;;WASJ;EAEP,WAAW,CAACA,YACV,SAAS;;;;;WAKJ;EAEP,gBAAgB,CAACA,YACf,SAAS;;;;;;;;;;WAUJ;EAEP,QAAQ,CAACA,YACP,SAAS;;;;;WAKJ;EAEP,aAAa,CAACA,YACZ,SAAS;;;;;WAKJ;EAEP,QAAQ,CAACA,YACP,SAAS;;;;;WAKJ;CACR;CAED,SAAS;EACP,WAAW,CAACA,YACV,SAAS;;;;;;;;;;WAUJ;EAEP,gBAAgB,CAACA,YACf,SAAS;;;;;;;;;;;;;;;;WAgBJ;EAEP,oBAAoB,CAACA,YACnB,SAAS;;;;;WAKJ;EAEP,cAAc,CAACA,YACb,SAAS;;;;;WAKJ;CACR;AACF;;;;;;;ACxGD,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AAmB,YAAY;AACtC,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MAAM;CACjB;CAED,AAAQ,2BAAoC;AAC1C,MAAI,KAAK,QAAQ,+BAA+B;AAC9C,UAAO,KAAK,QAAQ;EACrB;AACD,MAAI,KAAK,mBAAmB,uBAAuB;AACjD,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MACR;CAEH;CAED,AAAQ,kBAAkBC,QAA+B;AACvD,SAAO,OAAO,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,GAAG,MAAM,KAAK,EAAE,CAAC,KAAK,KAAK;CACvE;AACF;;;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,gBAAgBf,SAAsC;AACpE,QAAO,IAAI,UAAU;AACtB"}
1
+ {"version":3,"file":"eas.js","names":["graphql: PortalClient[\"graphql\"]","options: EASClientOptions","deployerAddress: Address","forwarderAddress?: Address","gasLimit?: string","request: SchemaRequest","fromAddress: Address","request: AttestationRequest","requests: AttestationRequest[]","schemaUID: Hex","attestationUID: Hex","value?: bigint","uid: Hex","_options?: GetSchemasOptions","_options?: GetAttestationsOptions","data: Hex","fields: SchemaField[]"],"sources":["../../src/portal/operations.ts","../../src/schema.ts","../../src/utils/validation.ts","../../src/eas.ts"],"sourcesContent":["import type { PortalClient } from \"./portal-client.js\";\n\nexport const GraphQLOperations = {\n mutations: {\n deploySchemaRegistry: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEASSchemaRegistry(\n $from: String!\n $constructorArguments: DeployContractEASSchemaRegistryInput!\n $gasLimit: String!\n ) {\n DeployContractEASSchemaRegistry(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n deployEAS: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEAS($from: String!, $constructorArguments: DeployContractEASInput!, $gasLimit: String!) {\n DeployContractEAS(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n registerSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASSchemaRegistryRegister(\n $address: String!\n $from: String!\n $input: EASSchemaRegistryRegisterInput!\n $gasLimit: String!\n ) {\n EASSchemaRegistryRegister(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n attest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASAttest($address: String!, $from: String!, $input: EASAttestInput!, $gasLimit: String!) {\n EASAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n multiAttest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASMultiAttest($address: String!, $from: String!, $input: EASMultiAttestInput!, $gasLimit: String!) {\n EASMultiAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n revoke: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASRevoke($address: String!, $from: String!, $input: EASRevokeInput!, $gasLimit: String!) {\n EASRevoke(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n },\n\n queries: {\n getSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASSchemaRegistryGetSchema($address: String!, $uid: String!) {\n EASSchemaRegistry(address: $address) {\n getSchema(uid: $uid) {\n uid\n resolver\n revocable\n schema\n }\n }\n }`),\n\n getAttestation: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetAttestation($address: String!, $uid: String!) {\n EAS(address: $address) {\n getAttestation(uid: $uid) {\n uid\n schema\n attester\n recipient\n time\n expirationTime\n revocable\n refUID\n data\n revocationTime\n }\n }\n }`),\n\n isAttestationValid: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASIsAttestationValid($address: String!, $uid: String!) {\n EAS(address: $address) {\n isAttestationValid(uid: $uid)\n }\n }`),\n\n getTimestamp: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetTimestamp($address: String!, $data: String!) {\n EAS(address: $address) {\n getTimestamp(data: $data)\n }\n }`),\n },\n};\n","import { type Address, type Hex, zeroAddress } from \"viem\";\nimport type { z } from \"zod\";\nimport type { EASClientOptionsSchema } from \"./utils/validation.js\";\n\n/**\n * Common address constants\n */\nexport const ZERO_ADDRESS = zeroAddress;\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\" as Hex;\n\n/**\n * Supported field types for EAS schema fields.\n * Maps to the Solidity types that can be used in EAS schemas.\n */\nexport const EAS_FIELD_TYPES = {\n string: \"string\",\n address: \"address\",\n bool: \"bool\",\n bytes: \"bytes\",\n bytes32: \"bytes32\",\n uint256: \"uint256\",\n int256: \"int256\",\n uint8: \"uint8\",\n int8: \"int8\",\n} as const;\n\nexport type EASFieldType = keyof typeof EAS_FIELD_TYPES;\n\n/**\n * Represents a single field in an EAS schema.\n */\nexport interface SchemaField {\n /** The name of the field */\n name: string;\n /** The Solidity type of the field */\n type: EASFieldType;\n /** Optional description of the field's purpose */\n description?: string;\n}\n\n/**\n * Configuration options for the EAS client\n */\nexport type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;\n\n/**\n * Schema registration request\n */\nexport interface SchemaRequest {\n /** Schema fields (alternative to schema string) */\n fields?: SchemaField[];\n /** Raw schema string (alternative to fields) */\n schema?: string;\n /** Resolver contract address (use ZERO_ADDRESS for no resolver) */\n resolver: Address;\n /** Whether attestations using this schema can be revoked */\n revocable: boolean;\n}\n\n/**\n * Attestation data structure\n */\nexport interface AttestationData {\n /** Recipient of the attestation */\n recipient: Address;\n /** Expiration time (0 for no expiration) */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID (use ZERO_BYTES32 for no reference) */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Attestation request\n */\nexport interface AttestationRequest {\n /** Schema UID to attest against */\n schema: Hex;\n /** Attestation data */\n data: AttestationData;\n}\n\n/**\n * Transaction result\n */\nexport interface TransactionResult {\n /** Transaction hash */\n hash: Hex;\n /** Whether the transaction was successful */\n success: boolean;\n}\n\n/**\n * Schema information\n */\nexport interface SchemaData {\n /** Schema UID */\n uid: Hex;\n /** Resolver contract address */\n resolver: Address;\n /** Whether attestations can be revoked */\n revocable: boolean;\n /** Schema string */\n schema: string;\n}\n\n/**\n * Attestation information\n */\nexport interface AttestationInfo {\n /** Attestation UID */\n uid: Hex;\n /** Schema UID */\n schema: Hex;\n /** Address that created the attestation */\n attester: Address;\n /** Recipient of the attestation */\n recipient: Address;\n /** Creation timestamp */\n time: bigint;\n /** Expiration timestamp */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Options for retrieving schemas\n */\nexport interface GetSchemasOptions {\n /** Maximum number of schemas to return */\n limit?: number;\n /** Number of schemas to skip */\n offset?: number;\n}\n\n/**\n * Options for retrieving attestations\n */\nexport interface GetAttestationsOptions {\n /** Maximum number of attestations to return */\n limit?: number;\n /** Number of attestations to skip */\n offset?: number;\n /** Filter by schema UID */\n schema?: Hex;\n /** Filter by attester address */\n attester?: Address;\n /** Filter by recipient address */\n recipient?: Address;\n}\n\n/**\n * Contract deployment result\n */\nexport interface DeploymentResult {\n /** Deployed EAS contract address */\n easAddress: Address;\n /** Deployed Schema Registry contract address */\n schemaRegistryAddress: Address;\n /** EAS deployment transaction hash (when address not immediately available) */\n easTransactionHash?: Hex;\n /** Schema Registry deployment transaction hash (when address not immediately available) */\n schemaRegistryTransactionHash?: Hex;\n}\n\n/**\n * @deprecated Use SchemaRequest instead\n * @internal\n */\nexport interface RegisterSchemaOptions extends SchemaRequest {}\n","import { ApplicationAccessTokenSchema, UrlSchema } from \"@settlemint/sdk-utils/validation\";\nimport { type Address, isAddress } from \"viem\";\nimport { z } from \"zod\";\n\nconst ethAddressSchema = z.custom<Address>(\n (val) => typeof val === \"string\" && isAddress(val),\n \"Invalid Ethereum address\",\n);\n\n/**\n * Zod schema for EASClientOptions.\n */\nexport const EASClientOptionsSchema = z.object({\n /**\n * The EAS instance URL\n */\n instance: UrlSchema,\n /**\n * The application access token\n */\n accessToken: ApplicationAccessTokenSchema.optional(),\n /**\n * The EAS contract address\n */\n easContractAddress: ethAddressSchema.optional(),\n /**\n * The schema registry contract address\n */\n schemaRegistryContractAddress: ethAddressSchema.optional(),\n /**\n * Whether to enable debug mode\n */\n debug: z.boolean().optional(),\n});\n","import { createPortalClient, waitForTransactionReceipt } from \"@settlemint/sdk-portal\";\nimport { createLogger, requestLogger } from \"@settlemint/sdk-utils/logging\";\nimport { validate } from \"@settlemint/sdk-utils/validation\";\nimport type { Address, Hex } from \"viem\";\nimport { GraphQLOperations } from \"./portal/operations.js\";\nimport type { PortalClient } from \"./portal/portal-client.js\";\nimport type { introspection } from \"./portal/portal-env.d.ts\";\nimport {\n type AttestationInfo,\n type AttestationRequest,\n type DeploymentResult,\n type EASClientOptions,\n type GetAttestationsOptions,\n type GetSchemasOptions,\n type SchemaData,\n type SchemaField,\n type SchemaRequest,\n type TransactionResult,\n ZERO_ADDRESS,\n} from \"./schema.js\";\nimport { EASClientOptionsSchema } from \"./utils/validation.js\";\n\nconst LOGGER = createLogger();\n\nconst DEFAULT_GAS_LIMIT = \"0x3d0900\";\n\n/**\n * Main EAS client class for interacting with Ethereum Attestation Service via Portal\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Deploy EAS contracts\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * console.log(\"EAS deployed at:\", deployment.easAddress);\n * ```\n */\nexport class EASClient {\n private readonly options: EASClientOptions;\n private readonly portalClient: PortalClient[\"client\"];\n private readonly portalGraphql: PortalClient[\"graphql\"];\n private deployedAddresses?: DeploymentResult;\n\n /**\n * Create a new EAS client instance\n *\n * @param options - Configuration options for the EAS client\n */\n constructor(options: EASClientOptions) {\n this.options = validate(EASClientOptionsSchema, options);\n\n const { client: portalClient, graphql: portalGraphql } = createPortalClient<{\n introspection: introspection;\n disableMasking: true;\n scalars: {\n // Change unknown to the type you are using to store metadata\n JSON: unknown;\n };\n }>(\n {\n instance: this.options.instance,\n accessToken: this.options.accessToken,\n },\n {\n fetch: requestLogger(LOGGER, \"portal\", fetch) as typeof fetch,\n },\n );\n\n this.portalClient = portalClient;\n this.portalGraphql = portalGraphql;\n }\n\n /**\n * Deploy EAS contracts via Portal\n *\n * @param deployerAddress - The address that will deploy the contracts\n * @param forwarderAddress - Optional trusted forwarder address (defaults to zero address)\n * @param gasLimit - Optional gas limit for deployment transactions (defaults to \"0x7a1200\")\n * @returns Promise resolving to deployment result with contract addresses and transaction hashes\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const deployment = await easClient.deploy(\n * \"0x1234567890123456789012345678901234567890\", // deployer address\n * \"0x0000000000000000000000000000000000000000\", // forwarder (optional)\n * \"0x7a1200\" // gas limit (optional)\n * );\n *\n * console.log(\"Schema Registry:\", deployment.schemaRegistryAddress);\n * console.log(\"EAS Contract:\", deployment.easAddress);\n * ```\n */\n public async deploy(\n deployerAddress: Address,\n forwarderAddress?: Address,\n gasLimit?: string,\n ): Promise<DeploymentResult> {\n const defaultForwarder = forwarderAddress || ZERO_ADDRESS;\n const defaultGasLimit = gasLimit || \"0x7a1200\";\n\n try {\n // Deploy Schema Registry first\n const schemaRegistryResponse = await this.portalClient.request(\n GraphQLOperations.mutations.deploySchemaRegistry(this.portalGraphql),\n {\n from: deployerAddress,\n constructorArguments: {\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n },\n );\n\n if (!schemaRegistryResponse.DeployContractEASSchemaRegistry?.transactionHash) {\n throw new Error(\"Schema Registry deployment failed - no transaction hash returned\");\n }\n\n const schemaRegistryTxHash = schemaRegistryResponse.DeployContractEASSchemaRegistry.transactionHash;\n\n // Wait for Schema Registry deployment and get contract address\n const schemaRegistryTransaction = await waitForTransactionReceipt(schemaRegistryTxHash as Hex, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!schemaRegistryTransaction?.receipt?.contractAddress) {\n throw new Error(\"Schema Registry deployment failed - could not get contract address from transaction receipt.\");\n }\n\n const schemaRegistryAddress = schemaRegistryTransaction.receipt.contractAddress;\n\n // Deploy EAS contract with correct Schema Registry address\n const easResponse = await this.portalClient.request(GraphQLOperations.mutations.deployEAS(this.portalGraphql), {\n from: deployerAddress,\n constructorArguments: {\n registry: schemaRegistryAddress,\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n });\n if (!easResponse.DeployContractEAS?.transactionHash) {\n throw new Error(\"EAS deployment failed - no transaction hash returned\");\n }\n\n const easTxHash = easResponse.DeployContractEAS.transactionHash as Hex;\n\n // Wait for EAS deployment and get contract address\n const easTransaction = await waitForTransactionReceipt(easTxHash, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!easTransaction?.receipt?.contractAddress) {\n throw new Error(\"EAS deployment failed - could not get contract address from transaction receipt.\");\n }\n const easAddress = easTransaction.receipt.contractAddress;\n\n this.deployedAddresses = {\n easAddress,\n schemaRegistryAddress,\n easTransactionHash: easTxHash as Hex,\n schemaRegistryTransactionHash: schemaRegistryTxHash as Hex,\n };\n\n return this.deployedAddresses;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to deploy EAS contracts: ${error.message}`);\n }\n }\n\n /**\n * Register a new schema in the EAS Schema Registry\n *\n * @param request - Schema registration request containing schema definition\n * @param fromAddress - Address that will register the schema\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const schemaResult = await easClient.registerSchema(\n * {\n * schema: \"uint256 eventId, uint8 voteIndex\",\n * resolver: \"0x0000000000000000000000000000000000000000\",\n * revocable: true\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Schema registered:\", schemaResult.hash);\n * ```\n */\n public async registerSchema(\n request: SchemaRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n let schemaString = request.schema;\n if (request.fields && !schemaString) {\n schemaString = this.buildSchemaString(request.fields);\n }\n\n if (!schemaString) {\n throw new Error(\"Schema string is required. Provide either 'schema' or 'fields'.\");\n }\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.registerSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n from: fromAddress,\n input: {\n schema: schemaString,\n resolver: request.resolver,\n revocable: request.revocable,\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASSchemaRegistryRegister?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to register schema: ${error.message}`);\n }\n }\n\n /**\n * Create an attestation\n *\n * @param request - Attestation request containing schema and data\n * @param fromAddress - Address that will create the attestation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const attestationResult = await easClient.attest(\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0), // No expiration\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\", // ABI-encoded data\n * value: BigInt(0)\n * }\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Attestation created:\", attestationResult.hash);\n * ```\n */\n public async attest(\n request: AttestationRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.attest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n request: {\n schema: request.schema,\n data: {\n recipient: request.data.recipient,\n expirationTime: request.data.expirationTime.toString(),\n revocable: request.data.revocable,\n refUID: request.data.refUID,\n data: request.data.data,\n value: request.data.value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create attestation: ${error.message}`);\n }\n }\n\n /**\n * Create multiple attestations in a single transaction\n *\n * @param requests - Array of attestation requests\n * @param fromAddress - Address that will create the attestations\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const multiAttestResult = await easClient.multiAttest(\n * [\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0),\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\",\n * value: BigInt(0)\n * }\n * },\n * {\n * schema: \"0x5678901234567890123456789012345678901234567890123456789012345678\",\n * data: {\n * recipient: \"0x5678901234567890123456789012345678901234\",\n * expirationTime: BigInt(0),\n * revocable: false,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x5678\",\n * value: BigInt(0)\n * }\n * }\n * ],\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Multiple attestations created:\", multiAttestResult.hash);\n * ```\n */\n public async multiAttest(\n requests: AttestationRequest[],\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n if (requests.length === 0) {\n throw new Error(\"At least one attestation request is required\");\n }\n\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.multiAttest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n multiRequests: requests.map((req) => ({\n schema: req.schema,\n data: [\n {\n recipient: req.data.recipient,\n expirationTime: req.data.expirationTime.toString(),\n revocable: req.data.revocable,\n refUID: req.data.refUID,\n data: req.data.data,\n value: req.data.value?.toString() || \"0\",\n },\n ],\n })),\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASMultiAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create multiple attestations: ${error.message}`);\n }\n }\n\n /**\n * Revoke an existing attestation\n *\n * @param schemaUID - UID of the schema used for the attestation\n * @param attestationUID - UID of the attestation to revoke\n * @param fromAddress - Address that will revoke the attestation\n * @param value - Optional ETH value to send with the revocation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const revokeResult = await easClient.revoke(\n * \"0x1234567890123456789012345678901234567890123456789012345678901234\", // schema UID\n * \"0x5678901234567890123456789012345678901234567890123456789012345678\", // attestation UID\n * \"0x1234567890123456789012345678901234567890\", // from address\n * BigInt(0) // value (optional)\n * );\n *\n * console.log(\"Attestation revoked:\", revokeResult.hash);\n * ```\n */\n public async revoke(\n schemaUID: Hex,\n attestationUID: Hex,\n fromAddress: Address,\n value?: bigint,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.revoke(this.portalGraphql), {\n address: this.getEASAddress(),\n from: fromAddress,\n input: {\n request: {\n schema: schemaUID,\n data: {\n uid: attestationUID,\n value: value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASRevoke?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to revoke attestation: ${error.message}`);\n }\n }\n\n /**\n * Get a schema by UID\n */\n public async getSchema(uid: Hex): Promise<SchemaData> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n uid: uid,\n });\n\n const schemaResult = response.EASSchemaRegistry?.getSchema;\n\n if (!schemaResult) {\n throw new Error(`Schema not found: ${uid}`);\n }\n\n return {\n uid: schemaResult.uid as Hex,\n resolver: schemaResult.resolver as Address,\n revocable: Boolean(schemaResult.revocable),\n schema: schemaResult.schema || \"\",\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get schema: ${error.message}`);\n }\n }\n\n /**\n * Get all schemas with pagination\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all schemas.\n * Consider using getSchema() for individual schema lookups.\n */\n public async getSchemas(_options?: GetSchemasOptions): Promise<SchemaData[]> {\n throw new Error(\n \"Schema listing not implemented yet. Portal's direct contract queries don't support listing all schemas. Use getSchema() for individual schema lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Get an attestation by UID\n */\n public async getAttestation(uid: Hex): Promise<AttestationInfo> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getAttestation(this.portalGraphql), {\n address: easAddress,\n uid: uid,\n });\n\n const attestationResult = response.EAS?.getAttestation;\n\n if (!attestationResult) {\n throw new Error(`Attestation not found: ${uid}`);\n }\n\n return {\n uid: attestationResult.uid as Hex,\n schema: attestationResult.schema as Hex,\n attester: attestationResult.attester as Address,\n recipient: attestationResult.recipient as Address,\n time: attestationResult.time ? BigInt(attestationResult.time) : BigInt(0),\n expirationTime: attestationResult.expirationTime ? BigInt(attestationResult.expirationTime) : BigInt(0),\n revocable: Boolean(attestationResult.revocable),\n refUID: attestationResult.refUID as Hex,\n data: attestationResult.data as Hex,\n value: BigInt(0), // Note: Portal schema doesn't include value, defaulting to 0\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get attestation: ${error.message}`);\n }\n }\n\n /**\n * Get attestations with pagination and filtering\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all attestations.\n * Consider using getAttestation() for individual attestation lookups.\n */\n public async getAttestations(_options?: GetAttestationsOptions): Promise<AttestationInfo[]> {\n throw new Error(\n \"Attestation listing not implemented yet. Portal's direct contract queries don't support listing all attestations. Use getAttestation() for individual attestation lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Check if an attestation is valid\n */\n public async isValidAttestation(uid: Hex): Promise<boolean> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(\n GraphQLOperations.queries.isAttestationValid(this.portalGraphql),\n {\n address: easAddress,\n uid: uid,\n },\n );\n\n return response.EAS?.isAttestationValid ?? false;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to check attestation validity: ${error.message}`);\n }\n }\n\n /**\n * Get the timestamp for specific data\n *\n * @param data - The data to get timestamp for\n * @returns The timestamp when the data was timestamped\n */\n public async getTimestamp(data: Hex): Promise<bigint> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getTimestamp(this.portalGraphql), {\n address: easAddress,\n data: data,\n });\n\n const timestampResult = response.EAS?.getTimestamp;\n\n if (timestampResult === undefined || timestampResult === null) {\n throw new Error(`No timestamp found for data: ${data}`);\n }\n\n return BigInt(timestampResult);\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get timestamp: ${error.message}`);\n }\n }\n\n /**\n * Get client configuration\n */\n public getOptions(): EASClientOptions {\n return { ...this.options };\n }\n\n /**\n * Get the Portal client instance for advanced operations\n */\n public getPortalClient(): PortalClient[\"client\"] {\n return this.portalClient;\n }\n\n /**\n * Get current contract addresses\n */\n public getContractAddresses(): { easAddress?: Address; schemaRegistryAddress?: Address } {\n return {\n easAddress: this.options.easContractAddress || this.deployedAddresses?.easAddress,\n schemaRegistryAddress:\n this.options.schemaRegistryContractAddress || this.deployedAddresses?.schemaRegistryAddress,\n };\n }\n\n private getEASAddress(): Address {\n if (this.options.easContractAddress) {\n return this.options.easContractAddress;\n }\n if (this.deployedAddresses?.easAddress) {\n return this.deployedAddresses.easAddress;\n }\n throw new Error(\"EAS contract address not available. Please provide it in options or deploy contracts first.\");\n }\n\n private getSchemaRegistryAddress(): Address {\n if (this.options.schemaRegistryContractAddress) {\n return this.options.schemaRegistryContractAddress;\n }\n if (this.deployedAddresses?.schemaRegistryAddress) {\n return this.deployedAddresses.schemaRegistryAddress;\n }\n throw new Error(\n \"Schema Registry contract address not available. Please provide it in options or deploy contracts first.\",\n );\n }\n\n private buildSchemaString(fields: SchemaField[]): string {\n return fields.map((field) => `${field.type} ${field.name}`).join(\", \");\n }\n}\n\n/**\n * Create an EAS client instance\n *\n * @param options - Configuration options for the EAS client\n * @returns EAS client instance\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Use the client\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * ```\n */\nexport function createEASClient(options: EASClientOptions): EASClient {\n return new EASClient(options);\n}\n\n// Re-export GraphQL operations for advanced usage\nexport { GraphQLOperations } from \"./portal/operations.js\";\n// Re-export types and constants\nexport type {\n AttestationData,\n AttestationInfo,\n AttestationRequest,\n DeploymentResult,\n EASClientOptions,\n EASFieldType,\n GetAttestationsOptions,\n GetSchemasOptions,\n RegisterSchemaOptions,\n SchemaData,\n SchemaField,\n SchemaRequest,\n TransactionResult,\n} from \"./schema.js\";\nexport { EAS_FIELD_TYPES, ZERO_ADDRESS, ZERO_BYTES32 } from \"./schema.js\";\n// Re-export validation utilities\nexport { EASClientOptionsSchema } from \"./utils/validation.js\";\n"],"mappings":";;;;;;;;AAEA,MAAa,oBAAoB;CAC/B,WAAW;EACT,sBAAsB,CAACA,YACrB,QAAQ,CAAC;;;;;;;;;SASN,CAAC,CAAC;EAEP,WAAW,CAACA,YACV,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;EAEP,gBAAgB,CAACA,YACf,QAAQ,CAAC;;;;;;;;;;SAUN,CAAC,CAAC;EAEP,QAAQ,CAACA,YACP,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;EAEP,aAAa,CAACA,YACZ,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;EAEP,QAAQ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B,MAAM;AAC7D,UAAM,IAAI,MAAM,CAAC,6BAA6B,EAAE,MAAM;GACvD;AAED,UAAO,OAAO,gBAAgB;EAC/B,SAAQ,KAAK;GACZ,MAAM,QAAQ;AACd,SAAM,IAAI,MAAM,CAAC,yBAAyB,EAAE,MAAM,SAAS;EAC5D;CACF;;;;CAKD,AAAO,aAA+B;AACpC,SAAO,EAAE,GAAG,KAAK,QAAS;CAC3B;;;;CAKD,AAAO,kBAA0C;AAC/C,SAAO,KAAK;CACb;;;;CAKD,AAAO,uBAAkF;AACvF,SAAO;GACL,YAAY,KAAK,QAAQ,sBAAsB,KAAK,mBAAmB;GACvE,uBACE,KAAK,QAAQ,iCAAiC,KAAK,mBAAmB;EACzE;CACF;CAED,AAAQ,gBAAyB;AAC/B,MAAI,KAAK,QAAQ,oBAAoB;AACnC,UAAO,KAAK,QAAQ;EACrB;AACD,MAAI,KAAK,mBAAmB,YAAY;AACtC,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MAAM;CACjB;CAED,AAAQ,2BAAoC;AAC1C,MAAI,KAAK,QAAQ,+BAA+B;AAC9C,UAAO,KAAK,QAAQ;EACrB;AACD,MAAI,KAAK,mBAAmB,uBAAuB;AACjD,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MACR;CAEH;CAED,AAAQ,kBAAkBC,QAA+B;AACvD,SAAO,OAAO,IAAI,CAAC,UAAU,GAAG,MAAM,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC,CAAC,KAAK,KAAK;CACvE;AACF;;;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,gBAAgBf,SAAsC;AACpE,QAAO,IAAI,UAAU;AACtB"}
package/dist/eas.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"eas.cjs","names":["graphql: PortalClient[\"graphql\"]","zeroAddress","UrlSchema","options: EASClientOptions","deployerAddress: Address","forwarderAddress?: Address","gasLimit?: string","request: SchemaRequest","fromAddress: Address","request: AttestationRequest","requests: AttestationRequest[]","schemaUID: Hex","attestationUID: Hex","value?: bigint","uid: Hex","_options?: GetSchemasOptions","_options?: GetAttestationsOptions","data: Hex","fields: SchemaField[]"],"sources":["../src/portal/operations.ts","../src/schema.ts","../src/utils/validation.ts","../src/eas.ts"],"sourcesContent":["import type { PortalClient } from \"./portal-client.js\";\n\nexport const GraphQLOperations = {\n mutations: {\n deploySchemaRegistry: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEASSchemaRegistry(\n $from: String!\n $constructorArguments: DeployContractEASSchemaRegistryInput!\n $gasLimit: String!\n ) {\n DeployContractEASSchemaRegistry(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n deployEAS: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEAS($from: String!, $constructorArguments: DeployContractEASInput!, $gasLimit: String!) {\n DeployContractEAS(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n registerSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASSchemaRegistryRegister(\n $address: String!\n $from: String!\n $input: EASSchemaRegistryRegisterInput!\n $gasLimit: String!\n ) {\n EASSchemaRegistryRegister(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n attest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASAttest($address: String!, $from: String!, $input: EASAttestInput!, $gasLimit: String!) {\n EASAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n multiAttest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASMultiAttest($address: String!, $from: String!, $input: EASMultiAttestInput!, $gasLimit: String!) {\n EASMultiAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n revoke: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASRevoke($address: String!, $from: String!, $input: EASRevokeInput!, $gasLimit: String!) {\n EASRevoke(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n },\n\n queries: {\n getSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASSchemaRegistryGetSchema($address: String!, $uid: String!) {\n EASSchemaRegistry(address: $address) {\n getSchema(uid: $uid) {\n uid\n resolver\n revocable\n schema\n }\n }\n }`),\n\n getAttestation: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetAttestation($address: String!, $uid: String!) {\n EAS(address: $address) {\n getAttestation(uid: $uid) {\n uid\n schema\n attester\n recipient\n time\n expirationTime\n revocable\n refUID\n data\n revocationTime\n }\n }\n }`),\n\n isAttestationValid: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASIsAttestationValid($address: String!, $uid: String!) {\n EAS(address: $address) {\n isAttestationValid(uid: $uid)\n }\n }`),\n\n getTimestamp: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetTimestamp($address: String!, $data: String!) {\n EAS(address: $address) {\n getTimestamp(data: $data)\n }\n }`),\n },\n};\n","import { type Address, type Hex, zeroAddress } from \"viem\";\nimport type { z } from \"zod\";\nimport type { EASClientOptionsSchema } from \"./utils/validation.js\";\n\n/**\n * Common address constants\n */\nexport const ZERO_ADDRESS = zeroAddress;\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\" as Hex;\n\n/**\n * Supported field types for EAS schema fields.\n * Maps to the Solidity types that can be used in EAS schemas.\n */\nexport const EAS_FIELD_TYPES = {\n string: \"string\",\n address: \"address\",\n bool: \"bool\",\n bytes: \"bytes\",\n bytes32: \"bytes32\",\n uint256: \"uint256\",\n int256: \"int256\",\n uint8: \"uint8\",\n int8: \"int8\",\n} as const;\n\nexport type EASFieldType = keyof typeof EAS_FIELD_TYPES;\n\n/**\n * Represents a single field in an EAS schema.\n */\nexport interface SchemaField {\n /** The name of the field */\n name: string;\n /** The Solidity type of the field */\n type: EASFieldType;\n /** Optional description of the field's purpose */\n description?: string;\n}\n\n/**\n * Configuration options for the EAS client\n */\nexport type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;\n\n/**\n * Schema registration request\n */\nexport interface SchemaRequest {\n /** Schema fields (alternative to schema string) */\n fields?: SchemaField[];\n /** Raw schema string (alternative to fields) */\n schema?: string;\n /** Resolver contract address (use ZERO_ADDRESS for no resolver) */\n resolver: Address;\n /** Whether attestations using this schema can be revoked */\n revocable: boolean;\n}\n\n/**\n * Attestation data structure\n */\nexport interface AttestationData {\n /** Recipient of the attestation */\n recipient: Address;\n /** Expiration time (0 for no expiration) */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID (use ZERO_BYTES32 for no reference) */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Attestation request\n */\nexport interface AttestationRequest {\n /** Schema UID to attest against */\n schema: Hex;\n /** Attestation data */\n data: AttestationData;\n}\n\n/**\n * Transaction result\n */\nexport interface TransactionResult {\n /** Transaction hash */\n hash: Hex;\n /** Whether the transaction was successful */\n success: boolean;\n}\n\n/**\n * Schema information\n */\nexport interface SchemaData {\n /** Schema UID */\n uid: Hex;\n /** Resolver contract address */\n resolver: Address;\n /** Whether attestations can be revoked */\n revocable: boolean;\n /** Schema string */\n schema: string;\n}\n\n/**\n * Attestation information\n */\nexport interface AttestationInfo {\n /** Attestation UID */\n uid: Hex;\n /** Schema UID */\n schema: Hex;\n /** Address that created the attestation */\n attester: Address;\n /** Recipient of the attestation */\n recipient: Address;\n /** Creation timestamp */\n time: bigint;\n /** Expiration timestamp */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Options for retrieving schemas\n */\nexport interface GetSchemasOptions {\n /** Maximum number of schemas to return */\n limit?: number;\n /** Number of schemas to skip */\n offset?: number;\n}\n\n/**\n * Options for retrieving attestations\n */\nexport interface GetAttestationsOptions {\n /** Maximum number of attestations to return */\n limit?: number;\n /** Number of attestations to skip */\n offset?: number;\n /** Filter by schema UID */\n schema?: Hex;\n /** Filter by attester address */\n attester?: Address;\n /** Filter by recipient address */\n recipient?: Address;\n}\n\n/**\n * Contract deployment result\n */\nexport interface DeploymentResult {\n /** Deployed EAS contract address */\n easAddress: Address;\n /** Deployed Schema Registry contract address */\n schemaRegistryAddress: Address;\n /** EAS deployment transaction hash (when address not immediately available) */\n easTransactionHash?: Hex;\n /** Schema Registry deployment transaction hash (when address not immediately available) */\n schemaRegistryTransactionHash?: Hex;\n}\n\n/**\n * @deprecated Use SchemaRequest instead\n * @internal\n */\nexport interface RegisterSchemaOptions extends SchemaRequest {}\n","import { ApplicationAccessTokenSchema, UrlSchema } from \"@settlemint/sdk-utils/validation\";\nimport { type Address, isAddress } from \"viem\";\nimport { z } from \"zod\";\n\nconst ethAddressSchema = z.custom<Address>(\n (val) => typeof val === \"string\" && isAddress(val),\n \"Invalid Ethereum address\",\n);\n\n/**\n * Zod schema for EASClientOptions.\n */\nexport const EASClientOptionsSchema = z.object({\n /**\n * The EAS instance URL\n */\n instance: UrlSchema,\n /**\n * The application access token\n */\n accessToken: ApplicationAccessTokenSchema.optional(),\n /**\n * The EAS contract address\n */\n easContractAddress: ethAddressSchema.optional(),\n /**\n * The schema registry contract address\n */\n schemaRegistryContractAddress: ethAddressSchema.optional(),\n /**\n * Whether to enable debug mode\n */\n debug: z.boolean().optional(),\n});\n","import { createPortalClient, waitForTransactionReceipt } from \"@settlemint/sdk-portal\";\nimport { createLogger, requestLogger } from \"@settlemint/sdk-utils/logging\";\nimport { validate } from \"@settlemint/sdk-utils/validation\";\nimport type { Address, Hex } from \"viem\";\nimport { GraphQLOperations } from \"./portal/operations.js\";\nimport type { PortalClient } from \"./portal/portal-client.js\";\nimport type { introspection } from \"./portal/portal-env.d.ts\";\nimport {\n type AttestationInfo,\n type AttestationRequest,\n type DeploymentResult,\n type EASClientOptions,\n type GetAttestationsOptions,\n type GetSchemasOptions,\n type SchemaData,\n type SchemaField,\n type SchemaRequest,\n type TransactionResult,\n ZERO_ADDRESS,\n} from \"./schema.js\";\nimport { EASClientOptionsSchema } from \"./utils/validation.js\";\n\nconst LOGGER = createLogger();\n\nconst DEFAULT_GAS_LIMIT = \"0x3d0900\";\n\n/**\n * Main EAS client class for interacting with Ethereum Attestation Service via Portal\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Deploy EAS contracts\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * console.log(\"EAS deployed at:\", deployment.easAddress);\n * ```\n */\nexport class EASClient {\n private readonly options: EASClientOptions;\n private readonly portalClient: PortalClient[\"client\"];\n private readonly portalGraphql: PortalClient[\"graphql\"];\n private deployedAddresses?: DeploymentResult;\n\n /**\n * Create a new EAS client instance\n *\n * @param options - Configuration options for the EAS client\n */\n constructor(options: EASClientOptions) {\n this.options = validate(EASClientOptionsSchema, options);\n\n const { client: portalClient, graphql: portalGraphql } = createPortalClient<{\n introspection: introspection;\n disableMasking: true;\n scalars: {\n // Change unknown to the type you are using to store metadata\n JSON: unknown;\n };\n }>(\n {\n instance: this.options.instance,\n accessToken: this.options.accessToken,\n },\n {\n fetch: requestLogger(LOGGER, \"portal\", fetch) as typeof fetch,\n },\n );\n\n this.portalClient = portalClient;\n this.portalGraphql = portalGraphql;\n }\n\n /**\n * Deploy EAS contracts via Portal\n *\n * @param deployerAddress - The address that will deploy the contracts\n * @param forwarderAddress - Optional trusted forwarder address (defaults to zero address)\n * @param gasLimit - Optional gas limit for deployment transactions (defaults to \"0x7a1200\")\n * @returns Promise resolving to deployment result with contract addresses and transaction hashes\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const deployment = await easClient.deploy(\n * \"0x1234567890123456789012345678901234567890\", // deployer address\n * \"0x0000000000000000000000000000000000000000\", // forwarder (optional)\n * \"0x7a1200\" // gas limit (optional)\n * );\n *\n * console.log(\"Schema Registry:\", deployment.schemaRegistryAddress);\n * console.log(\"EAS Contract:\", deployment.easAddress);\n * ```\n */\n public async deploy(\n deployerAddress: Address,\n forwarderAddress?: Address,\n gasLimit?: string,\n ): Promise<DeploymentResult> {\n const defaultForwarder = forwarderAddress || ZERO_ADDRESS;\n const defaultGasLimit = gasLimit || \"0x7a1200\";\n\n try {\n // Deploy Schema Registry first\n const schemaRegistryResponse = await this.portalClient.request(\n GraphQLOperations.mutations.deploySchemaRegistry(this.portalGraphql),\n {\n from: deployerAddress,\n constructorArguments: {\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n },\n );\n\n if (!schemaRegistryResponse.DeployContractEASSchemaRegistry?.transactionHash) {\n throw new Error(\"Schema Registry deployment failed - no transaction hash returned\");\n }\n\n const schemaRegistryTxHash = schemaRegistryResponse.DeployContractEASSchemaRegistry.transactionHash;\n\n // Wait for Schema Registry deployment and get contract address\n const schemaRegistryTransaction = await waitForTransactionReceipt(schemaRegistryTxHash as Hex, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!schemaRegistryTransaction?.receipt?.contractAddress) {\n throw new Error(\"Schema Registry deployment failed - could not get contract address from transaction receipt.\");\n }\n\n const schemaRegistryAddress = schemaRegistryTransaction.receipt.contractAddress;\n\n // Deploy EAS contract with correct Schema Registry address\n const easResponse = await this.portalClient.request(GraphQLOperations.mutations.deployEAS(this.portalGraphql), {\n from: deployerAddress,\n constructorArguments: {\n registry: schemaRegistryAddress,\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n });\n if (!easResponse.DeployContractEAS?.transactionHash) {\n throw new Error(\"EAS deployment failed - no transaction hash returned\");\n }\n\n const easTxHash = easResponse.DeployContractEAS.transactionHash as Hex;\n\n // Wait for EAS deployment and get contract address\n const easTransaction = await waitForTransactionReceipt(easTxHash, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!easTransaction?.receipt?.contractAddress) {\n throw new Error(\"EAS deployment failed - could not get contract address from transaction receipt.\");\n }\n const easAddress = easTransaction.receipt.contractAddress;\n\n this.deployedAddresses = {\n easAddress,\n schemaRegistryAddress,\n easTransactionHash: easTxHash as Hex,\n schemaRegistryTransactionHash: schemaRegistryTxHash as Hex,\n };\n\n return this.deployedAddresses;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to deploy EAS contracts: ${error.message}`);\n }\n }\n\n /**\n * Register a new schema in the EAS Schema Registry\n *\n * @param request - Schema registration request containing schema definition\n * @param fromAddress - Address that will register the schema\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const schemaResult = await easClient.registerSchema(\n * {\n * schema: \"uint256 eventId, uint8 voteIndex\",\n * resolver: \"0x0000000000000000000000000000000000000000\",\n * revocable: true\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Schema registered:\", schemaResult.hash);\n * ```\n */\n public async registerSchema(\n request: SchemaRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n let schemaString = request.schema;\n if (request.fields && !schemaString) {\n schemaString = this.buildSchemaString(request.fields);\n }\n\n if (!schemaString) {\n throw new Error(\"Schema string is required. Provide either 'schema' or 'fields'.\");\n }\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.registerSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n from: fromAddress,\n input: {\n schema: schemaString,\n resolver: request.resolver,\n revocable: request.revocable,\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASSchemaRegistryRegister?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to register schema: ${error.message}`);\n }\n }\n\n /**\n * Create an attestation\n *\n * @param request - Attestation request containing schema and data\n * @param fromAddress - Address that will create the attestation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const attestationResult = await easClient.attest(\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0), // No expiration\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\", // ABI-encoded data\n * value: BigInt(0)\n * }\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Attestation created:\", attestationResult.hash);\n * ```\n */\n public async attest(\n request: AttestationRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.attest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n request: {\n schema: request.schema,\n data: {\n recipient: request.data.recipient,\n expirationTime: request.data.expirationTime.toString(),\n revocable: request.data.revocable,\n refUID: request.data.refUID,\n data: request.data.data,\n value: request.data.value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create attestation: ${error.message}`);\n }\n }\n\n /**\n * Create multiple attestations in a single transaction\n *\n * @param requests - Array of attestation requests\n * @param fromAddress - Address that will create the attestations\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const multiAttestResult = await easClient.multiAttest(\n * [\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0),\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\",\n * value: BigInt(0)\n * }\n * },\n * {\n * schema: \"0x5678901234567890123456789012345678901234567890123456789012345678\",\n * data: {\n * recipient: \"0x5678901234567890123456789012345678901234\",\n * expirationTime: BigInt(0),\n * revocable: false,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x5678\",\n * value: BigInt(0)\n * }\n * }\n * ],\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Multiple attestations created:\", multiAttestResult.hash);\n * ```\n */\n public async multiAttest(\n requests: AttestationRequest[],\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n if (requests.length === 0) {\n throw new Error(\"At least one attestation request is required\");\n }\n\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.multiAttest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n multiRequests: requests.map((req) => ({\n schema: req.schema,\n data: [\n {\n recipient: req.data.recipient,\n expirationTime: req.data.expirationTime.toString(),\n revocable: req.data.revocable,\n refUID: req.data.refUID,\n data: req.data.data,\n value: req.data.value?.toString() || \"0\",\n },\n ],\n })),\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASMultiAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create multiple attestations: ${error.message}`);\n }\n }\n\n /**\n * Revoke an existing attestation\n *\n * @param schemaUID - UID of the schema used for the attestation\n * @param attestationUID - UID of the attestation to revoke\n * @param fromAddress - Address that will revoke the attestation\n * @param value - Optional ETH value to send with the revocation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const revokeResult = await easClient.revoke(\n * \"0x1234567890123456789012345678901234567890123456789012345678901234\", // schema UID\n * \"0x5678901234567890123456789012345678901234567890123456789012345678\", // attestation UID\n * \"0x1234567890123456789012345678901234567890\", // from address\n * BigInt(0) // value (optional)\n * );\n *\n * console.log(\"Attestation revoked:\", revokeResult.hash);\n * ```\n */\n public async revoke(\n schemaUID: Hex,\n attestationUID: Hex,\n fromAddress: Address,\n value?: bigint,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.revoke(this.portalGraphql), {\n address: this.getEASAddress(),\n from: fromAddress,\n input: {\n request: {\n schema: schemaUID,\n data: {\n uid: attestationUID,\n value: value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASRevoke?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to revoke attestation: ${error.message}`);\n }\n }\n\n /**\n * Get a schema by UID\n */\n public async getSchema(uid: Hex): Promise<SchemaData> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n uid: uid,\n });\n\n const schemaResult = response.EASSchemaRegistry?.getSchema;\n\n if (!schemaResult) {\n throw new Error(`Schema not found: ${uid}`);\n }\n\n return {\n uid: schemaResult.uid as Hex,\n resolver: schemaResult.resolver as Address,\n revocable: Boolean(schemaResult.revocable),\n schema: schemaResult.schema || \"\",\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get schema: ${error.message}`);\n }\n }\n\n /**\n * Get all schemas with pagination\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all schemas.\n * Consider using getSchema() for individual schema lookups.\n */\n public async getSchemas(_options?: GetSchemasOptions): Promise<SchemaData[]> {\n throw new Error(\n \"Schema listing not implemented yet. Portal's direct contract queries don't support listing all schemas. Use getSchema() for individual schema lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Get an attestation by UID\n */\n public async getAttestation(uid: Hex): Promise<AttestationInfo> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getAttestation(this.portalGraphql), {\n address: easAddress,\n uid: uid,\n });\n\n const attestationResult = response.EAS?.getAttestation;\n\n if (!attestationResult) {\n throw new Error(`Attestation not found: ${uid}`);\n }\n\n return {\n uid: attestationResult.uid as Hex,\n schema: attestationResult.schema as Hex,\n attester: attestationResult.attester as Address,\n recipient: attestationResult.recipient as Address,\n time: attestationResult.time ? BigInt(attestationResult.time) : BigInt(0),\n expirationTime: attestationResult.expirationTime ? BigInt(attestationResult.expirationTime) : BigInt(0),\n revocable: Boolean(attestationResult.revocable),\n refUID: attestationResult.refUID as Hex,\n data: attestationResult.data as Hex,\n value: BigInt(0), // Note: Portal schema doesn't include value, defaulting to 0\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get attestation: ${error.message}`);\n }\n }\n\n /**\n * Get attestations with pagination and filtering\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all attestations.\n * Consider using getAttestation() for individual attestation lookups.\n */\n public async getAttestations(_options?: GetAttestationsOptions): Promise<AttestationInfo[]> {\n throw new Error(\n \"Attestation listing not implemented yet. Portal's direct contract queries don't support listing all attestations. Use getAttestation() for individual attestation lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Check if an attestation is valid\n */\n public async isValidAttestation(uid: Hex): Promise<boolean> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(\n GraphQLOperations.queries.isAttestationValid(this.portalGraphql),\n {\n address: easAddress,\n uid: uid,\n },\n );\n\n return response.EAS?.isAttestationValid ?? false;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to check attestation validity: ${error.message}`);\n }\n }\n\n /**\n * Get the timestamp for specific data\n *\n * @param data - The data to get timestamp for\n * @returns The timestamp when the data was timestamped\n */\n public async getTimestamp(data: Hex): Promise<bigint> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getTimestamp(this.portalGraphql), {\n address: easAddress,\n data: data,\n });\n\n const timestampResult = response.EAS?.getTimestamp;\n\n if (timestampResult === undefined || timestampResult === null) {\n throw new Error(`No timestamp found for data: ${data}`);\n }\n\n return BigInt(timestampResult);\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get timestamp: ${error.message}`);\n }\n }\n\n /**\n * Get client configuration\n */\n public getOptions(): EASClientOptions {\n return { ...this.options };\n }\n\n /**\n * Get the Portal client instance for advanced operations\n */\n public getPortalClient(): PortalClient[\"client\"] {\n return this.portalClient;\n }\n\n /**\n * Get current contract addresses\n */\n public getContractAddresses(): { easAddress?: Address; schemaRegistryAddress?: Address } {\n return {\n easAddress: this.options.easContractAddress || this.deployedAddresses?.easAddress,\n schemaRegistryAddress:\n this.options.schemaRegistryContractAddress || this.deployedAddresses?.schemaRegistryAddress,\n };\n }\n\n private getEASAddress(): Address {\n if (this.options.easContractAddress) {\n return this.options.easContractAddress;\n }\n if (this.deployedAddresses?.easAddress) {\n return this.deployedAddresses.easAddress;\n }\n throw new Error(\"EAS contract address not available. Please provide it in options or deploy contracts first.\");\n }\n\n private getSchemaRegistryAddress(): Address {\n if (this.options.schemaRegistryContractAddress) {\n return this.options.schemaRegistryContractAddress;\n }\n if (this.deployedAddresses?.schemaRegistryAddress) {\n return this.deployedAddresses.schemaRegistryAddress;\n }\n throw new Error(\n \"Schema Registry contract address not available. Please provide it in options or deploy contracts first.\",\n );\n }\n\n private buildSchemaString(fields: SchemaField[]): string {\n return fields.map((field) => `${field.type} ${field.name}`).join(\", \");\n }\n}\n\n/**\n * Create an EAS client instance\n *\n * @param options - Configuration options for the EAS client\n * @returns EAS client instance\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Use the client\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * ```\n */\nexport function createEASClient(options: EASClientOptions): EASClient {\n return new EASClient(options);\n}\n\n// Re-export GraphQL operations for advanced usage\nexport { GraphQLOperations } from \"./portal/operations.js\";\n// Re-export types and constants\nexport type {\n AttestationData,\n AttestationInfo,\n AttestationRequest,\n DeploymentResult,\n EASClientOptions,\n EASFieldType,\n GetAttestationsOptions,\n GetSchemasOptions,\n RegisterSchemaOptions,\n SchemaData,\n SchemaField,\n SchemaRequest,\n TransactionResult,\n} from \"./schema.js\";\nexport { EAS_FIELD_TYPES, ZERO_ADDRESS, ZERO_BYTES32 } from \"./schema.js\";\n// Re-export validation utilities\nexport { EASClientOptionsSchema } from \"./utils/validation.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAa,oBAAoB;CAC/B,WAAW;EACT,sBAAsB,CAACA,YACrB,SAAS;;;;;;;;;WASJ;EAEP,WAAW,CAACA,YACV,SAAS;;;;;WAKJ;EAEP,gBAAgB,CAACA,YACf,SAAS;;;;;;;;;;WAUJ;EAEP,QAAQ,CAACA,YACP,SAAS;;;;;WAKJ;EAEP,aAAa,CAACA,YACZ,SAAS;;;;;WAKJ;EAEP,QAAQ,CAACA,YACP,SAAS;;;;;WAKJ;CACR;CAED,SAAS;EACP,WAAW,CAACA,YACV,SAAS;;;;;;;;;;WAUJ;EAEP,gBAAgB,CAACA,YACf,SAAS;;;;;;;;;;;;;;;;WAgBJ;EAEP,oBAAoB,CAACA,YACnB,SAAS;;;;;WAKJ;EAEP,cAAc,CAACA,YACb,SAAS;;;;;WAKJ;CACR;AACF;;;;;;;ACxGD,MAAa,eAAeC;AAC5B,MAAa,eAAe;;;;;AAM5B,MAAa,kBAAkB;CAC7B,QAAQ;CACR,SAAS;CACT,MAAM;CACN,OAAO;CACP,SAAS;CACT,SAAS;CACT,QAAQ;CACR,OAAO;CACP,MAAM;AACP;;;;ACpBD,MAAM,mBAAmB,MAAE,OACzB,CAAC,eAAe,QAAQ,YAAY,oBAAU,IAAI,EAClD,2BACD;;;;AAKD,MAAa,yBAAyB,MAAE,OAAO;CAI7C,UAAUC;CAIV,aAAa,+DAA6B,UAAU;CAIpD,oBAAoB,iBAAiB,UAAU;CAI/C,+BAA+B,iBAAiB,UAAU;CAI1D,OAAO,MAAE,SAAS,C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;;;;;AAqBD,SAAgB,gBAAgBf,SAAsC;AACpE,QAAO,IAAI,UAAU;AACtB"}
1
+ {"version":3,"file":"eas.cjs","names":["graphql: PortalClient[\"graphql\"]","zeroAddress","z","UrlSchema","ApplicationAccessTokenSchema","options: EASClientOptions","deployerAddress: Address","forwarderAddress?: Address","gasLimit?: string","request: SchemaRequest","fromAddress: Address","request: AttestationRequest","requests: AttestationRequest[]","schemaUID: Hex","attestationUID: Hex","value?: bigint","uid: Hex","_options?: GetSchemasOptions","_options?: GetAttestationsOptions","data: Hex","fields: SchemaField[]"],"sources":["../src/portal/operations.ts","../src/schema.ts","../src/utils/validation.ts","../src/eas.ts"],"sourcesContent":["import type { PortalClient } from \"./portal-client.js\";\n\nexport const GraphQLOperations = {\n mutations: {\n deploySchemaRegistry: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEASSchemaRegistry(\n $from: String!\n $constructorArguments: DeployContractEASSchemaRegistryInput!\n $gasLimit: String!\n ) {\n DeployContractEASSchemaRegistry(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n deployEAS: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEAS($from: String!, $constructorArguments: DeployContractEASInput!, $gasLimit: String!) {\n DeployContractEAS(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n registerSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASSchemaRegistryRegister(\n $address: String!\n $from: String!\n $input: EASSchemaRegistryRegisterInput!\n $gasLimit: String!\n ) {\n EASSchemaRegistryRegister(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n attest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASAttest($address: String!, $from: String!, $input: EASAttestInput!, $gasLimit: String!) {\n EASAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n multiAttest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASMultiAttest($address: String!, $from: String!, $input: EASMultiAttestInput!, $gasLimit: String!) {\n EASMultiAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n revoke: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASRevoke($address: String!, $from: String!, $input: EASRevokeInput!, $gasLimit: String!) {\n EASRevoke(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n },\n\n queries: {\n getSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASSchemaRegistryGetSchema($address: String!, $uid: String!) {\n EASSchemaRegistry(address: $address) {\n getSchema(uid: $uid) {\n uid\n resolver\n revocable\n schema\n }\n }\n }`),\n\n getAttestation: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetAttestation($address: String!, $uid: String!) {\n EAS(address: $address) {\n getAttestation(uid: $uid) {\n uid\n schema\n attester\n recipient\n time\n expirationTime\n revocable\n refUID\n data\n revocationTime\n }\n }\n }`),\n\n isAttestationValid: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASIsAttestationValid($address: String!, $uid: String!) {\n EAS(address: $address) {\n isAttestationValid(uid: $uid)\n }\n }`),\n\n getTimestamp: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetTimestamp($address: String!, $data: String!) {\n EAS(address: $address) {\n getTimestamp(data: $data)\n }\n }`),\n },\n};\n","import { type Address, type Hex, zeroAddress } from \"viem\";\nimport type { z } from \"zod\";\nimport type { EASClientOptionsSchema } from \"./utils/validation.js\";\n\n/**\n * Common address constants\n */\nexport const ZERO_ADDRESS = zeroAddress;\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\" as Hex;\n\n/**\n * Supported field types for EAS schema fields.\n * Maps to the Solidity types that can be used in EAS schemas.\n */\nexport const EAS_FIELD_TYPES = {\n string: \"string\",\n address: \"address\",\n bool: \"bool\",\n bytes: \"bytes\",\n bytes32: \"bytes32\",\n uint256: \"uint256\",\n int256: \"int256\",\n uint8: \"uint8\",\n int8: \"int8\",\n} as const;\n\nexport type EASFieldType = keyof typeof EAS_FIELD_TYPES;\n\n/**\n * Represents a single field in an EAS schema.\n */\nexport interface SchemaField {\n /** The name of the field */\n name: string;\n /** The Solidity type of the field */\n type: EASFieldType;\n /** Optional description of the field's purpose */\n description?: string;\n}\n\n/**\n * Configuration options for the EAS client\n */\nexport type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;\n\n/**\n * Schema registration request\n */\nexport interface SchemaRequest {\n /** Schema fields (alternative to schema string) */\n fields?: SchemaField[];\n /** Raw schema string (alternative to fields) */\n schema?: string;\n /** Resolver contract address (use ZERO_ADDRESS for no resolver) */\n resolver: Address;\n /** Whether attestations using this schema can be revoked */\n revocable: boolean;\n}\n\n/**\n * Attestation data structure\n */\nexport interface AttestationData {\n /** Recipient of the attestation */\n recipient: Address;\n /** Expiration time (0 for no expiration) */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID (use ZERO_BYTES32 for no reference) */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Attestation request\n */\nexport interface AttestationRequest {\n /** Schema UID to attest against */\n schema: Hex;\n /** Attestation data */\n data: AttestationData;\n}\n\n/**\n * Transaction result\n */\nexport interface TransactionResult {\n /** Transaction hash */\n hash: Hex;\n /** Whether the transaction was successful */\n success: boolean;\n}\n\n/**\n * Schema information\n */\nexport interface SchemaData {\n /** Schema UID */\n uid: Hex;\n /** Resolver contract address */\n resolver: Address;\n /** Whether attestations can be revoked */\n revocable: boolean;\n /** Schema string */\n schema: string;\n}\n\n/**\n * Attestation information\n */\nexport interface AttestationInfo {\n /** Attestation UID */\n uid: Hex;\n /** Schema UID */\n schema: Hex;\n /** Address that created the attestation */\n attester: Address;\n /** Recipient of the attestation */\n recipient: Address;\n /** Creation timestamp */\n time: bigint;\n /** Expiration timestamp */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Options for retrieving schemas\n */\nexport interface GetSchemasOptions {\n /** Maximum number of schemas to return */\n limit?: number;\n /** Number of schemas to skip */\n offset?: number;\n}\n\n/**\n * Options for retrieving attestations\n */\nexport interface GetAttestationsOptions {\n /** Maximum number of attestations to return */\n limit?: number;\n /** Number of attestations to skip */\n offset?: number;\n /** Filter by schema UID */\n schema?: Hex;\n /** Filter by attester address */\n attester?: Address;\n /** Filter by recipient address */\n recipient?: Address;\n}\n\n/**\n * Contract deployment result\n */\nexport interface DeploymentResult {\n /** Deployed EAS contract address */\n easAddress: Address;\n /** Deployed Schema Registry contract address */\n schemaRegistryAddress: Address;\n /** EAS deployment transaction hash (when address not immediately available) */\n easTransactionHash?: Hex;\n /** Schema Registry deployment transaction hash (when address not immediately available) */\n schemaRegistryTransactionHash?: Hex;\n}\n\n/**\n * @deprecated Use SchemaRequest instead\n * @internal\n */\nexport interface RegisterSchemaOptions extends SchemaRequest {}\n","import { ApplicationAccessTokenSchema, UrlSchema } from \"@settlemint/sdk-utils/validation\";\nimport { type Address, isAddress } from \"viem\";\nimport { z } from \"zod\";\n\nconst ethAddressSchema = z.custom<Address>(\n (val) => typeof val === \"string\" && isAddress(val),\n \"Invalid Ethereum address\",\n);\n\n/**\n * Zod schema for EASClientOptions.\n */\nexport const EASClientOptionsSchema = z.object({\n /**\n * The EAS instance URL\n */\n instance: UrlSchema,\n /**\n * The application access token\n */\n accessToken: ApplicationAccessTokenSchema.optional(),\n /**\n * The EAS contract address\n */\n easContractAddress: ethAddressSchema.optional(),\n /**\n * The schema registry contract address\n */\n schemaRegistryContractAddress: ethAddressSchema.optional(),\n /**\n * Whether to enable debug mode\n */\n debug: z.boolean().optional(),\n});\n","import { createPortalClient, waitForTransactionReceipt } from \"@settlemint/sdk-portal\";\nimport { createLogger, requestLogger } from \"@settlemint/sdk-utils/logging\";\nimport { validate } from \"@settlemint/sdk-utils/validation\";\nimport type { Address, Hex } from \"viem\";\nimport { GraphQLOperations } from \"./portal/operations.js\";\nimport type { PortalClient } from \"./portal/portal-client.js\";\nimport type { introspection } from \"./portal/portal-env.d.ts\";\nimport {\n type AttestationInfo,\n type AttestationRequest,\n type DeploymentResult,\n type EASClientOptions,\n type GetAttestationsOptions,\n type GetSchemasOptions,\n type SchemaData,\n type SchemaField,\n type SchemaRequest,\n type TransactionResult,\n ZERO_ADDRESS,\n} from \"./schema.js\";\nimport { EASClientOptionsSchema } from \"./utils/validation.js\";\n\nconst LOGGER = createLogger();\n\nconst DEFAULT_GAS_LIMIT = \"0x3d0900\";\n\n/**\n * Main EAS client class for interacting with Ethereum Attestation Service via Portal\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Deploy EAS contracts\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * console.log(\"EAS deployed at:\", deployment.easAddress);\n * ```\n */\nexport class EASClient {\n private readonly options: EASClientOptions;\n private readonly portalClient: PortalClient[\"client\"];\n private readonly portalGraphql: PortalClient[\"graphql\"];\n private deployedAddresses?: DeploymentResult;\n\n /**\n * Create a new EAS client instance\n *\n * @param options - Configuration options for the EAS client\n */\n constructor(options: EASClientOptions) {\n this.options = validate(EASClientOptionsSchema, options);\n\n const { client: portalClient, graphql: portalGraphql } = createPortalClient<{\n introspection: introspection;\n disableMasking: true;\n scalars: {\n // Change unknown to the type you are using to store metadata\n JSON: unknown;\n };\n }>(\n {\n instance: this.options.instance,\n accessToken: this.options.accessToken,\n },\n {\n fetch: requestLogger(LOGGER, \"portal\", fetch) as typeof fetch,\n },\n );\n\n this.portalClient = portalClient;\n this.portalGraphql = portalGraphql;\n }\n\n /**\n * Deploy EAS contracts via Portal\n *\n * @param deployerAddress - The address that will deploy the contracts\n * @param forwarderAddress - Optional trusted forwarder address (defaults to zero address)\n * @param gasLimit - Optional gas limit for deployment transactions (defaults to \"0x7a1200\")\n * @returns Promise resolving to deployment result with contract addresses and transaction hashes\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const deployment = await easClient.deploy(\n * \"0x1234567890123456789012345678901234567890\", // deployer address\n * \"0x0000000000000000000000000000000000000000\", // forwarder (optional)\n * \"0x7a1200\" // gas limit (optional)\n * );\n *\n * console.log(\"Schema Registry:\", deployment.schemaRegistryAddress);\n * console.log(\"EAS Contract:\", deployment.easAddress);\n * ```\n */\n public async deploy(\n deployerAddress: Address,\n forwarderAddress?: Address,\n gasLimit?: string,\n ): Promise<DeploymentResult> {\n const defaultForwarder = forwarderAddress || ZERO_ADDRESS;\n const defaultGasLimit = gasLimit || \"0x7a1200\";\n\n try {\n // Deploy Schema Registry first\n const schemaRegistryResponse = await this.portalClient.request(\n GraphQLOperations.mutations.deploySchemaRegistry(this.portalGraphql),\n {\n from: deployerAddress,\n constructorArguments: {\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n },\n );\n\n if (!schemaRegistryResponse.DeployContractEASSchemaRegistry?.transactionHash) {\n throw new Error(\"Schema Registry deployment failed - no transaction hash returned\");\n }\n\n const schemaRegistryTxHash = schemaRegistryResponse.DeployContractEASSchemaRegistry.transactionHash;\n\n // Wait for Schema Registry deployment and get contract address\n const schemaRegistryTransaction = await waitForTransactionReceipt(schemaRegistryTxHash as Hex, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!schemaRegistryTransaction?.receipt?.contractAddress) {\n throw new Error(\"Schema Registry deployment failed - could not get contract address from transaction receipt.\");\n }\n\n const schemaRegistryAddress = schemaRegistryTransaction.receipt.contractAddress;\n\n // Deploy EAS contract with correct Schema Registry address\n const easResponse = await this.portalClient.request(GraphQLOperations.mutations.deployEAS(this.portalGraphql), {\n from: deployerAddress,\n constructorArguments: {\n registry: schemaRegistryAddress,\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n });\n if (!easResponse.DeployContractEAS?.transactionHash) {\n throw new Error(\"EAS deployment failed - no transaction hash returned\");\n }\n\n const easTxHash = easResponse.DeployContractEAS.transactionHash as Hex;\n\n // Wait for EAS deployment and get contract address\n const easTransaction = await waitForTransactionReceipt(easTxHash, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!easTransaction?.receipt?.contractAddress) {\n throw new Error(\"EAS deployment failed - could not get contract address from transaction receipt.\");\n }\n const easAddress = easTransaction.receipt.contractAddress;\n\n this.deployedAddresses = {\n easAddress,\n schemaRegistryAddress,\n easTransactionHash: easTxHash as Hex,\n schemaRegistryTransactionHash: schemaRegistryTxHash as Hex,\n };\n\n return this.deployedAddresses;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to deploy EAS contracts: ${error.message}`);\n }\n }\n\n /**\n * Register a new schema in the EAS Schema Registry\n *\n * @param request - Schema registration request containing schema definition\n * @param fromAddress - Address that will register the schema\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const schemaResult = await easClient.registerSchema(\n * {\n * schema: \"uint256 eventId, uint8 voteIndex\",\n * resolver: \"0x0000000000000000000000000000000000000000\",\n * revocable: true\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Schema registered:\", schemaResult.hash);\n * ```\n */\n public async registerSchema(\n request: SchemaRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n let schemaString = request.schema;\n if (request.fields && !schemaString) {\n schemaString = this.buildSchemaString(request.fields);\n }\n\n if (!schemaString) {\n throw new Error(\"Schema string is required. Provide either 'schema' or 'fields'.\");\n }\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.registerSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n from: fromAddress,\n input: {\n schema: schemaString,\n resolver: request.resolver,\n revocable: request.revocable,\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASSchemaRegistryRegister?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to register schema: ${error.message}`);\n }\n }\n\n /**\n * Create an attestation\n *\n * @param request - Attestation request containing schema and data\n * @param fromAddress - Address that will create the attestation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const attestationResult = await easClient.attest(\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0), // No expiration\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\", // ABI-encoded data\n * value: BigInt(0)\n * }\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Attestation created:\", attestationResult.hash);\n * ```\n */\n public async attest(\n request: AttestationRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.attest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n request: {\n schema: request.schema,\n data: {\n recipient: request.data.recipient,\n expirationTime: request.data.expirationTime.toString(),\n revocable: request.data.revocable,\n refUID: request.data.refUID,\n data: request.data.data,\n value: request.data.value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create attestation: ${error.message}`);\n }\n }\n\n /**\n * Create multiple attestations in a single transaction\n *\n * @param requests - Array of attestation requests\n * @param fromAddress - Address that will create the attestations\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const multiAttestResult = await easClient.multiAttest(\n * [\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0),\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\",\n * value: BigInt(0)\n * }\n * },\n * {\n * schema: \"0x5678901234567890123456789012345678901234567890123456789012345678\",\n * data: {\n * recipient: \"0x5678901234567890123456789012345678901234\",\n * expirationTime: BigInt(0),\n * revocable: false,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x5678\",\n * value: BigInt(0)\n * }\n * }\n * ],\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Multiple attestations created:\", multiAttestResult.hash);\n * ```\n */\n public async multiAttest(\n requests: AttestationRequest[],\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n if (requests.length === 0) {\n throw new Error(\"At least one attestation request is required\");\n }\n\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.multiAttest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n multiRequests: requests.map((req) => ({\n schema: req.schema,\n data: [\n {\n recipient: req.data.recipient,\n expirationTime: req.data.expirationTime.toString(),\n revocable: req.data.revocable,\n refUID: req.data.refUID,\n data: req.data.data,\n value: req.data.value?.toString() || \"0\",\n },\n ],\n })),\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASMultiAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create multiple attestations: ${error.message}`);\n }\n }\n\n /**\n * Revoke an existing attestation\n *\n * @param schemaUID - UID of the schema used for the attestation\n * @param attestationUID - UID of the attestation to revoke\n * @param fromAddress - Address that will revoke the attestation\n * @param value - Optional ETH value to send with the revocation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const revokeResult = await easClient.revoke(\n * \"0x1234567890123456789012345678901234567890123456789012345678901234\", // schema UID\n * \"0x5678901234567890123456789012345678901234567890123456789012345678\", // attestation UID\n * \"0x1234567890123456789012345678901234567890\", // from address\n * BigInt(0) // value (optional)\n * );\n *\n * console.log(\"Attestation revoked:\", revokeResult.hash);\n * ```\n */\n public async revoke(\n schemaUID: Hex,\n attestationUID: Hex,\n fromAddress: Address,\n value?: bigint,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.revoke(this.portalGraphql), {\n address: this.getEASAddress(),\n from: fromAddress,\n input: {\n request: {\n schema: schemaUID,\n data: {\n uid: attestationUID,\n value: value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASRevoke?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to revoke attestation: ${error.message}`);\n }\n }\n\n /**\n * Get a schema by UID\n */\n public async getSchema(uid: Hex): Promise<SchemaData> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n uid: uid,\n });\n\n const schemaResult = response.EASSchemaRegistry?.getSchema;\n\n if (!schemaResult) {\n throw new Error(`Schema not found: ${uid}`);\n }\n\n return {\n uid: schemaResult.uid as Hex,\n resolver: schemaResult.resolver as Address,\n revocable: Boolean(schemaResult.revocable),\n schema: schemaResult.schema || \"\",\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get schema: ${error.message}`);\n }\n }\n\n /**\n * Get all schemas with pagination\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all schemas.\n * Consider using getSchema() for individual schema lookups.\n */\n public async getSchemas(_options?: GetSchemasOptions): Promise<SchemaData[]> {\n throw new Error(\n \"Schema listing not implemented yet. Portal's direct contract queries don't support listing all schemas. Use getSchema() for individual schema lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Get an attestation by UID\n */\n public async getAttestation(uid: Hex): Promise<AttestationInfo> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getAttestation(this.portalGraphql), {\n address: easAddress,\n uid: uid,\n });\n\n const attestationResult = response.EAS?.getAttestation;\n\n if (!attestationResult) {\n throw new Error(`Attestation not found: ${uid}`);\n }\n\n return {\n uid: attestationResult.uid as Hex,\n schema: attestationResult.schema as Hex,\n attester: attestationResult.attester as Address,\n recipient: attestationResult.recipient as Address,\n time: attestationResult.time ? BigInt(attestationResult.time) : BigInt(0),\n expirationTime: attestationResult.expirationTime ? BigInt(attestationResult.expirationTime) : BigInt(0),\n revocable: Boolean(attestationResult.revocable),\n refUID: attestationResult.refUID as Hex,\n data: attestationResult.data as Hex,\n value: BigInt(0), // Note: Portal schema doesn't include value, defaulting to 0\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get attestation: ${error.message}`);\n }\n }\n\n /**\n * Get attestations with pagination and filtering\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all attestations.\n * Consider using getAttestation() for individual attestation lookups.\n */\n public async getAttestations(_options?: GetAttestationsOptions): Promise<AttestationInfo[]> {\n throw new Error(\n \"Attestation listing not implemented yet. Portal's direct contract queries don't support listing all attestations. Use getAttestation() for individual attestation lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Check if an attestation is valid\n */\n public async isValidAttestation(uid: Hex): Promise<boolean> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(\n GraphQLOperations.queries.isAttestationValid(this.portalGraphql),\n {\n address: easAddress,\n uid: uid,\n },\n );\n\n return response.EAS?.isAttestationValid ?? false;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to check attestation validity: ${error.message}`);\n }\n }\n\n /**\n * Get the timestamp for specific data\n *\n * @param data - The data to get timestamp for\n * @returns The timestamp when the data was timestamped\n */\n public async getTimestamp(data: Hex): Promise<bigint> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getTimestamp(this.portalGraphql), {\n address: easAddress,\n data: data,\n });\n\n const timestampResult = response.EAS?.getTimestamp;\n\n if (timestampResult === undefined || timestampResult === null) {\n throw new Error(`No timestamp found for data: ${data}`);\n }\n\n return BigInt(timestampResult);\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get timestamp: ${error.message}`);\n }\n }\n\n /**\n * Get client configuration\n */\n public getOptions(): EASClientOptions {\n return { ...this.options };\n }\n\n /**\n * Get the Portal client instance for advanced operations\n */\n public getPortalClient(): PortalClient[\"client\"] {\n return this.portalClient;\n }\n\n /**\n * Get current contract addresses\n */\n public getContractAddresses(): { easAddress?: Address; schemaRegistryAddress?: Address } {\n return {\n easAddress: this.options.easContractAddress || this.deployedAddresses?.easAddress,\n schemaRegistryAddress:\n this.options.schemaRegistryContractAddress || this.deployedAddresses?.schemaRegistryAddress,\n };\n }\n\n private getEASAddress(): Address {\n if (this.options.easContractAddress) {\n return this.options.easContractAddress;\n }\n if (this.deployedAddresses?.easAddress) {\n return this.deployedAddresses.easAddress;\n }\n throw new Error(\"EAS contract address not available. Please provide it in options or deploy contracts first.\");\n }\n\n private getSchemaRegistryAddress(): Address {\n if (this.options.schemaRegistryContractAddress) {\n return this.options.schemaRegistryContractAddress;\n }\n if (this.deployedAddresses?.schemaRegistryAddress) {\n return this.deployedAddresses.schemaRegistryAddress;\n }\n throw new Error(\n \"Schema Registry contract address not available. Please provide it in options or deploy contracts first.\",\n );\n }\n\n private buildSchemaString(fields: SchemaField[]): string {\n return fields.map((field) => `${field.type} ${field.name}`).join(\", \");\n }\n}\n\n/**\n * Create an EAS client instance\n *\n * @param options - Configuration options for the EAS client\n * @returns EAS client instance\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Use the client\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * ```\n */\nexport function createEASClient(options: EASClientOptions): EASClient {\n return new EASClient(options);\n}\n\n// Re-export GraphQL operations for advanced usage\nexport { GraphQLOperations } from \"./portal/operations.js\";\n// Re-export types and constants\nexport type {\n AttestationData,\n AttestationInfo,\n AttestationRequest,\n DeploymentResult,\n EASClientOptions,\n EASFieldType,\n GetAttestationsOptions,\n GetSchemasOptions,\n RegisterSchemaOptions,\n SchemaData,\n SchemaField,\n SchemaRequest,\n TransactionResult,\n} from \"./schema.js\";\nexport { EAS_FIELD_TYPES, ZERO_ADDRESS, ZERO_BYTES32 } from \"./schema.js\";\n// Re-export validation utilities\nexport { EASClientOptionsSchema } from \"./utils/validation.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAa,oBAAoB;CAC/B,WAAW;EACT,sBAAsB,CAACA,YACrB,QAAQ,CAAC;;;;;;;;;SASN,CAAC,CAAC;EAEP,WAAW,CAACA,YACV,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;EAEP,gBAAgB,CAACA,YACf,QAAQ,CAAC;;;;;;;;;;SAUN,CAAC,CAAC;EAEP,QAAQ,CAACA,YACP,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;EAEP,aAAa,CAACA,YACZ,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;EAEP,QAAQ,CAACA,YACP,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;CACR;CAED,SAAS;EACP,WAAW,CAACA,YACV,QAAQ,CAAC;;;;;;;;;;SAUN,CAAC,CAAC;EAEP,gBAAgB,CAACA,YACf,QAAQ,CAAC;;;;;;;;;;;;;;;;SAgBN,CAAC,CAAC;EAEP,oBAAoB,CAACA,YACnB,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;EAEP,cAAc,CAACA,YACb,QAAQ,CAAC;;;;;SAKN,CAAC,CAAC;CACR;AACF;;;;;;;ACxG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sBAAsB,KAAK,mBAAmB;GACvE,uBACE,KAAK,QAAQ,iCAAiC,KAAK,mBAAmB;EACzE;CACF;CAED,AAAQ,gBAAyB;AAC/B,MAAI,KAAK,QAAQ,oBAAoB;AACnC,UAAO,KAAK,QAAQ;EACrB;AACD,MAAI,KAAK,mBAAmB,YAAY;AACtC,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MAAM;CACjB;CAED,AAAQ,2BAAoC;AAC1C,MAAI,KAAK,QAAQ,+BAA+B;AAC9C,UAAO,KAAK,QAAQ;EACrB;AACD,MAAI,KAAK,mBAAmB,uBAAuB;AACjD,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MACR;CAEH;CAED,AAAQ,kBAAkBC,QAA+B;AACvD,SAAO,OAAO,IAAI,CAAC,UAAU,GAAG,MAAM,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC,CAAC,KAAK,KAAK;CACvE;AACF;;;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,gBAAgBf,SAAsC;AACpE,QAAO,IAAI,UAAU;AACtB"}
package/dist/eas.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"eas.js","names":["graphql: PortalClient[\"graphql\"]","options: EASClientOptions","deployerAddress: Address","forwarderAddress?: Address","gasLimit?: string","request: SchemaRequest","fromAddress: Address","request: AttestationRequest","requests: AttestationRequest[]","schemaUID: Hex","attestationUID: Hex","value?: bigint","uid: Hex","_options?: GetSchemasOptions","_options?: GetAttestationsOptions","data: Hex","fields: SchemaField[]"],"sources":["../src/portal/operations.ts","../src/schema.ts","../src/utils/validation.ts","../src/eas.ts"],"sourcesContent":["import type { PortalClient } from \"./portal-client.js\";\n\nexport const GraphQLOperations = {\n mutations: {\n deploySchemaRegistry: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEASSchemaRegistry(\n $from: String!\n $constructorArguments: DeployContractEASSchemaRegistryInput!\n $gasLimit: String!\n ) {\n DeployContractEASSchemaRegistry(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n deployEAS: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEAS($from: String!, $constructorArguments: DeployContractEASInput!, $gasLimit: String!) {\n DeployContractEAS(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n registerSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASSchemaRegistryRegister(\n $address: String!\n $from: String!\n $input: EASSchemaRegistryRegisterInput!\n $gasLimit: String!\n ) {\n EASSchemaRegistryRegister(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n attest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASAttest($address: String!, $from: String!, $input: EASAttestInput!, $gasLimit: String!) {\n EASAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n multiAttest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASMultiAttest($address: String!, $from: String!, $input: EASMultiAttestInput!, $gasLimit: String!) {\n EASMultiAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n revoke: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASRevoke($address: String!, $from: String!, $input: EASRevokeInput!, $gasLimit: String!) {\n EASRevoke(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n },\n\n queries: {\n getSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASSchemaRegistryGetSchema($address: String!, $uid: String!) {\n EASSchemaRegistry(address: $address) {\n getSchema(uid: $uid) {\n uid\n resolver\n revocable\n schema\n }\n }\n }`),\n\n getAttestation: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetAttestation($address: String!, $uid: String!) {\n EAS(address: $address) {\n getAttestation(uid: $uid) {\n uid\n schema\n attester\n recipient\n time\n expirationTime\n revocable\n refUID\n data\n revocationTime\n }\n }\n }`),\n\n isAttestationValid: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASIsAttestationValid($address: String!, $uid: String!) {\n EAS(address: $address) {\n isAttestationValid(uid: $uid)\n }\n }`),\n\n getTimestamp: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetTimestamp($address: String!, $data: String!) {\n EAS(address: $address) {\n getTimestamp(data: $data)\n }\n }`),\n },\n};\n","import { type Address, type Hex, zeroAddress } from \"viem\";\nimport type { z } from \"zod\";\nimport type { EASClientOptionsSchema } from \"./utils/validation.js\";\n\n/**\n * Common address constants\n */\nexport const ZERO_ADDRESS = zeroAddress;\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\" as Hex;\n\n/**\n * Supported field types for EAS schema fields.\n * Maps to the Solidity types that can be used in EAS schemas.\n */\nexport const EAS_FIELD_TYPES = {\n string: \"string\",\n address: \"address\",\n bool: \"bool\",\n bytes: \"bytes\",\n bytes32: \"bytes32\",\n uint256: \"uint256\",\n int256: \"int256\",\n uint8: \"uint8\",\n int8: \"int8\",\n} as const;\n\nexport type EASFieldType = keyof typeof EAS_FIELD_TYPES;\n\n/**\n * Represents a single field in an EAS schema.\n */\nexport interface SchemaField {\n /** The name of the field */\n name: string;\n /** The Solidity type of the field */\n type: EASFieldType;\n /** Optional description of the field's purpose */\n description?: string;\n}\n\n/**\n * Configuration options for the EAS client\n */\nexport type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;\n\n/**\n * Schema registration request\n */\nexport interface SchemaRequest {\n /** Schema fields (alternative to schema string) */\n fields?: SchemaField[];\n /** Raw schema string (alternative to fields) */\n schema?: string;\n /** Resolver contract address (use ZERO_ADDRESS for no resolver) */\n resolver: Address;\n /** Whether attestations using this schema can be revoked */\n revocable: boolean;\n}\n\n/**\n * Attestation data structure\n */\nexport interface AttestationData {\n /** Recipient of the attestation */\n recipient: Address;\n /** Expiration time (0 for no expiration) */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID (use ZERO_BYTES32 for no reference) */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Attestation request\n */\nexport interface AttestationRequest {\n /** Schema UID to attest against */\n schema: Hex;\n /** Attestation data */\n data: AttestationData;\n}\n\n/**\n * Transaction result\n */\nexport interface TransactionResult {\n /** Transaction hash */\n hash: Hex;\n /** Whether the transaction was successful */\n success: boolean;\n}\n\n/**\n * Schema information\n */\nexport interface SchemaData {\n /** Schema UID */\n uid: Hex;\n /** Resolver contract address */\n resolver: Address;\n /** Whether attestations can be revoked */\n revocable: boolean;\n /** Schema string */\n schema: string;\n}\n\n/**\n * Attestation information\n */\nexport interface AttestationInfo {\n /** Attestation UID */\n uid: Hex;\n /** Schema UID */\n schema: Hex;\n /** Address that created the attestation */\n attester: Address;\n /** Recipient of the attestation */\n recipient: Address;\n /** Creation timestamp */\n time: bigint;\n /** Expiration timestamp */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Options for retrieving schemas\n */\nexport interface GetSchemasOptions {\n /** Maximum number of schemas to return */\n limit?: number;\n /** Number of schemas to skip */\n offset?: number;\n}\n\n/**\n * Options for retrieving attestations\n */\nexport interface GetAttestationsOptions {\n /** Maximum number of attestations to return */\n limit?: number;\n /** Number of attestations to skip */\n offset?: number;\n /** Filter by schema UID */\n schema?: Hex;\n /** Filter by attester address */\n attester?: Address;\n /** Filter by recipient address */\n recipient?: Address;\n}\n\n/**\n * Contract deployment result\n */\nexport interface DeploymentResult {\n /** Deployed EAS contract address */\n easAddress: Address;\n /** Deployed Schema Registry contract address */\n schemaRegistryAddress: Address;\n /** EAS deployment transaction hash (when address not immediately available) */\n easTransactionHash?: Hex;\n /** Schema Registry deployment transaction hash (when address not immediately available) */\n schemaRegistryTransactionHash?: Hex;\n}\n\n/**\n * @deprecated Use SchemaRequest instead\n * @internal\n */\nexport interface RegisterSchemaOptions extends SchemaRequest {}\n","import { ApplicationAccessTokenSchema, UrlSchema } from \"@settlemint/sdk-utils/validation\";\nimport { type Address, isAddress } from \"viem\";\nimport { z } from \"zod\";\n\nconst ethAddressSchema = z.custom<Address>(\n (val) => typeof val === \"string\" && isAddress(val),\n \"Invalid Ethereum address\",\n);\n\n/**\n * Zod schema for EASClientOptions.\n */\nexport const EASClientOptionsSchema = z.object({\n /**\n * The EAS instance URL\n */\n instance: UrlSchema,\n /**\n * The application access token\n */\n accessToken: ApplicationAccessTokenSchema.optional(),\n /**\n * The EAS contract address\n */\n easContractAddress: ethAddressSchema.optional(),\n /**\n * The schema registry contract address\n */\n schemaRegistryContractAddress: ethAddressSchema.optional(),\n /**\n * Whether to enable debug mode\n */\n debug: z.boolean().optional(),\n});\n","import { createPortalClient, waitForTransactionReceipt } from \"@settlemint/sdk-portal\";\nimport { createLogger, requestLogger } from \"@settlemint/sdk-utils/logging\";\nimport { validate } from \"@settlemint/sdk-utils/validation\";\nimport type { Address, Hex } from \"viem\";\nimport { GraphQLOperations } from \"./portal/operations.js\";\nimport type { PortalClient } from \"./portal/portal-client.js\";\nimport type { introspection } from \"./portal/portal-env.d.ts\";\nimport {\n type AttestationInfo,\n type AttestationRequest,\n type DeploymentResult,\n type EASClientOptions,\n type GetAttestationsOptions,\n type GetSchemasOptions,\n type SchemaData,\n type SchemaField,\n type SchemaRequest,\n type TransactionResult,\n ZERO_ADDRESS,\n} from \"./schema.js\";\nimport { EASClientOptionsSchema } from \"./utils/validation.js\";\n\nconst LOGGER = createLogger();\n\nconst DEFAULT_GAS_LIMIT = \"0x3d0900\";\n\n/**\n * Main EAS client class for interacting with Ethereum Attestation Service via Portal\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Deploy EAS contracts\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * console.log(\"EAS deployed at:\", deployment.easAddress);\n * ```\n */\nexport class EASClient {\n private readonly options: EASClientOptions;\n private readonly portalClient: PortalClient[\"client\"];\n private readonly portalGraphql: PortalClient[\"graphql\"];\n private deployedAddresses?: DeploymentResult;\n\n /**\n * Create a new EAS client instance\n *\n * @param options - Configuration options for the EAS client\n */\n constructor(options: EASClientOptions) {\n this.options = validate(EASClientOptionsSchema, options);\n\n const { client: portalClient, graphql: portalGraphql } = createPortalClient<{\n introspection: introspection;\n disableMasking: true;\n scalars: {\n // Change unknown to the type you are using to store metadata\n JSON: unknown;\n };\n }>(\n {\n instance: this.options.instance,\n accessToken: this.options.accessToken,\n },\n {\n fetch: requestLogger(LOGGER, \"portal\", fetch) as typeof fetch,\n },\n );\n\n this.portalClient = portalClient;\n this.portalGraphql = portalGraphql;\n }\n\n /**\n * Deploy EAS contracts via Portal\n *\n * @param deployerAddress - The address that will deploy the contracts\n * @param forwarderAddress - Optional trusted forwarder address (defaults to zero address)\n * @param gasLimit - Optional gas limit for deployment transactions (defaults to \"0x7a1200\")\n * @returns Promise resolving to deployment result with contract addresses and transaction hashes\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const deployment = await easClient.deploy(\n * \"0x1234567890123456789012345678901234567890\", // deployer address\n * \"0x0000000000000000000000000000000000000000\", // forwarder (optional)\n * \"0x7a1200\" // gas limit (optional)\n * );\n *\n * console.log(\"Schema Registry:\", deployment.schemaRegistryAddress);\n * console.log(\"EAS Contract:\", deployment.easAddress);\n * ```\n */\n public async deploy(\n deployerAddress: Address,\n forwarderAddress?: Address,\n gasLimit?: string,\n ): Promise<DeploymentResult> {\n const defaultForwarder = forwarderAddress || ZERO_ADDRESS;\n const defaultGasLimit = gasLimit || \"0x7a1200\";\n\n try {\n // Deploy Schema Registry first\n const schemaRegistryResponse = await this.portalClient.request(\n GraphQLOperations.mutations.deploySchemaRegistry(this.portalGraphql),\n {\n from: deployerAddress,\n constructorArguments: {\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n },\n );\n\n if (!schemaRegistryResponse.DeployContractEASSchemaRegistry?.transactionHash) {\n throw new Error(\"Schema Registry deployment failed - no transaction hash returned\");\n }\n\n const schemaRegistryTxHash = schemaRegistryResponse.DeployContractEASSchemaRegistry.transactionHash;\n\n // Wait for Schema Registry deployment and get contract address\n const schemaRegistryTransaction = await waitForTransactionReceipt(schemaRegistryTxHash as Hex, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!schemaRegistryTransaction?.receipt?.contractAddress) {\n throw new Error(\"Schema Registry deployment failed - could not get contract address from transaction receipt.\");\n }\n\n const schemaRegistryAddress = schemaRegistryTransaction.receipt.contractAddress;\n\n // Deploy EAS contract with correct Schema Registry address\n const easResponse = await this.portalClient.request(GraphQLOperations.mutations.deployEAS(this.portalGraphql), {\n from: deployerAddress,\n constructorArguments: {\n registry: schemaRegistryAddress,\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n });\n if (!easResponse.DeployContractEAS?.transactionHash) {\n throw new Error(\"EAS deployment failed - no transaction hash returned\");\n }\n\n const easTxHash = easResponse.DeployContractEAS.transactionHash as Hex;\n\n // Wait for EAS deployment and get contract address\n const easTransaction = await waitForTransactionReceipt(easTxHash, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!easTransaction?.receipt?.contractAddress) {\n throw new Error(\"EAS deployment failed - could not get contract address from transaction receipt.\");\n }\n const easAddress = easTransaction.receipt.contractAddress;\n\n this.deployedAddresses = {\n easAddress,\n schemaRegistryAddress,\n easTransactionHash: easTxHash as Hex,\n schemaRegistryTransactionHash: schemaRegistryTxHash as Hex,\n };\n\n return this.deployedAddresses;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to deploy EAS contracts: ${error.message}`);\n }\n }\n\n /**\n * Register a new schema in the EAS Schema Registry\n *\n * @param request - Schema registration request containing schema definition\n * @param fromAddress - Address that will register the schema\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const schemaResult = await easClient.registerSchema(\n * {\n * schema: \"uint256 eventId, uint8 voteIndex\",\n * resolver: \"0x0000000000000000000000000000000000000000\",\n * revocable: true\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Schema registered:\", schemaResult.hash);\n * ```\n */\n public async registerSchema(\n request: SchemaRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n let schemaString = request.schema;\n if (request.fields && !schemaString) {\n schemaString = this.buildSchemaString(request.fields);\n }\n\n if (!schemaString) {\n throw new Error(\"Schema string is required. Provide either 'schema' or 'fields'.\");\n }\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.registerSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n from: fromAddress,\n input: {\n schema: schemaString,\n resolver: request.resolver,\n revocable: request.revocable,\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASSchemaRegistryRegister?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to register schema: ${error.message}`);\n }\n }\n\n /**\n * Create an attestation\n *\n * @param request - Attestation request containing schema and data\n * @param fromAddress - Address that will create the attestation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const attestationResult = await easClient.attest(\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0), // No expiration\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\", // ABI-encoded data\n * value: BigInt(0)\n * }\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Attestation created:\", attestationResult.hash);\n * ```\n */\n public async attest(\n request: AttestationRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.attest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n request: {\n schema: request.schema,\n data: {\n recipient: request.data.recipient,\n expirationTime: request.data.expirationTime.toString(),\n revocable: request.data.revocable,\n refUID: request.data.refUID,\n data: request.data.data,\n value: request.data.value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create attestation: ${error.message}`);\n }\n }\n\n /**\n * Create multiple attestations in a single transaction\n *\n * @param requests - Array of attestation requests\n * @param fromAddress - Address that will create the attestations\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const multiAttestResult = await easClient.multiAttest(\n * [\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0),\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\",\n * value: BigInt(0)\n * }\n * },\n * {\n * schema: \"0x5678901234567890123456789012345678901234567890123456789012345678\",\n * data: {\n * recipient: \"0x5678901234567890123456789012345678901234\",\n * expirationTime: BigInt(0),\n * revocable: false,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x5678\",\n * value: BigInt(0)\n * }\n * }\n * ],\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Multiple attestations created:\", multiAttestResult.hash);\n * ```\n */\n public async multiAttest(\n requests: AttestationRequest[],\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n if (requests.length === 0) {\n throw new Error(\"At least one attestation request is required\");\n }\n\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.multiAttest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n multiRequests: requests.map((req) => ({\n schema: req.schema,\n data: [\n {\n recipient: req.data.recipient,\n expirationTime: req.data.expirationTime.toString(),\n revocable: req.data.revocable,\n refUID: req.data.refUID,\n data: req.data.data,\n value: req.data.value?.toString() || \"0\",\n },\n ],\n })),\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASMultiAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create multiple attestations: ${error.message}`);\n }\n }\n\n /**\n * Revoke an existing attestation\n *\n * @param schemaUID - UID of the schema used for the attestation\n * @param attestationUID - UID of the attestation to revoke\n * @param fromAddress - Address that will revoke the attestation\n * @param value - Optional ETH value to send with the revocation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const revokeResult = await easClient.revoke(\n * \"0x1234567890123456789012345678901234567890123456789012345678901234\", // schema UID\n * \"0x5678901234567890123456789012345678901234567890123456789012345678\", // attestation UID\n * \"0x1234567890123456789012345678901234567890\", // from address\n * BigInt(0) // value (optional)\n * );\n *\n * console.log(\"Attestation revoked:\", revokeResult.hash);\n * ```\n */\n public async revoke(\n schemaUID: Hex,\n attestationUID: Hex,\n fromAddress: Address,\n value?: bigint,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.revoke(this.portalGraphql), {\n address: this.getEASAddress(),\n from: fromAddress,\n input: {\n request: {\n schema: schemaUID,\n data: {\n uid: attestationUID,\n value: value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASRevoke?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to revoke attestation: ${error.message}`);\n }\n }\n\n /**\n * Get a schema by UID\n */\n public async getSchema(uid: Hex): Promise<SchemaData> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n uid: uid,\n });\n\n const schemaResult = response.EASSchemaRegistry?.getSchema;\n\n if (!schemaResult) {\n throw new Error(`Schema not found: ${uid}`);\n }\n\n return {\n uid: schemaResult.uid as Hex,\n resolver: schemaResult.resolver as Address,\n revocable: Boolean(schemaResult.revocable),\n schema: schemaResult.schema || \"\",\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get schema: ${error.message}`);\n }\n }\n\n /**\n * Get all schemas with pagination\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all schemas.\n * Consider using getSchema() for individual schema lookups.\n */\n public async getSchemas(_options?: GetSchemasOptions): Promise<SchemaData[]> {\n throw new Error(\n \"Schema listing not implemented yet. Portal's direct contract queries don't support listing all schemas. Use getSchema() for individual schema lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Get an attestation by UID\n */\n public async getAttestation(uid: Hex): Promise<AttestationInfo> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getAttestation(this.portalGraphql), {\n address: easAddress,\n uid: uid,\n });\n\n const attestationResult = response.EAS?.getAttestation;\n\n if (!attestationResult) {\n throw new Error(`Attestation not found: ${uid}`);\n }\n\n return {\n uid: attestationResult.uid as Hex,\n schema: attestationResult.schema as Hex,\n attester: attestationResult.attester as Address,\n recipient: attestationResult.recipient as Address,\n time: attestationResult.time ? BigInt(attestationResult.time) : BigInt(0),\n expirationTime: attestationResult.expirationTime ? BigInt(attestationResult.expirationTime) : BigInt(0),\n revocable: Boolean(attestationResult.revocable),\n refUID: attestationResult.refUID as Hex,\n data: attestationResult.data as Hex,\n value: BigInt(0), // Note: Portal schema doesn't include value, defaulting to 0\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get attestation: ${error.message}`);\n }\n }\n\n /**\n * Get attestations with pagination and filtering\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all attestations.\n * Consider using getAttestation() for individual attestation lookups.\n */\n public async getAttestations(_options?: GetAttestationsOptions): Promise<AttestationInfo[]> {\n throw new Error(\n \"Attestation listing not implemented yet. Portal's direct contract queries don't support listing all attestations. Use getAttestation() for individual attestation lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Check if an attestation is valid\n */\n public async isValidAttestation(uid: Hex): Promise<boolean> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(\n GraphQLOperations.queries.isAttestationValid(this.portalGraphql),\n {\n address: easAddress,\n uid: uid,\n },\n );\n\n return response.EAS?.isAttestationValid ?? false;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to check attestation validity: ${error.message}`);\n }\n }\n\n /**\n * Get the timestamp for specific data\n *\n * @param data - The data to get timestamp for\n * @returns The timestamp when the data was timestamped\n */\n public async getTimestamp(data: Hex): Promise<bigint> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getTimestamp(this.portalGraphql), {\n address: easAddress,\n data: data,\n });\n\n const timestampResult = response.EAS?.getTimestamp;\n\n if (timestampResult === undefined || timestampResult === null) {\n throw new Error(`No timestamp found for data: ${data}`);\n }\n\n return BigInt(timestampResult);\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get timestamp: ${error.message}`);\n }\n }\n\n /**\n * Get client configuration\n */\n public getOptions(): EASClientOptions {\n return { ...this.options };\n }\n\n /**\n * Get the Portal client instance for advanced operations\n */\n public getPortalClient(): PortalClient[\"client\"] {\n return this.portalClient;\n }\n\n /**\n * Get current contract addresses\n */\n public getContractAddresses(): { easAddress?: Address; schemaRegistryAddress?: Address } {\n return {\n easAddress: this.options.easContractAddress || this.deployedAddresses?.easAddress,\n schemaRegistryAddress:\n this.options.schemaRegistryContractAddress || this.deployedAddresses?.schemaRegistryAddress,\n };\n }\n\n private getEASAddress(): Address {\n if (this.options.easContractAddress) {\n return this.options.easContractAddress;\n }\n if (this.deployedAddresses?.easAddress) {\n return this.deployedAddresses.easAddress;\n }\n throw new Error(\"EAS contract address not available. Please provide it in options or deploy contracts first.\");\n }\n\n private getSchemaRegistryAddress(): Address {\n if (this.options.schemaRegistryContractAddress) {\n return this.options.schemaRegistryContractAddress;\n }\n if (this.deployedAddresses?.schemaRegistryAddress) {\n return this.deployedAddresses.schemaRegistryAddress;\n }\n throw new Error(\n \"Schema Registry contract address not available. Please provide it in options or deploy contracts first.\",\n );\n }\n\n private buildSchemaString(fields: SchemaField[]): string {\n return fields.map((field) => `${field.type} ${field.name}`).join(\", \");\n }\n}\n\n/**\n * Create an EAS client instance\n *\n * @param options - Configuration options for the EAS client\n * @returns EAS client instance\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Use the client\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * ```\n */\nexport function createEASClient(options: EASClientOptions): EASClient {\n return new EASClient(options);\n}\n\n// Re-export GraphQL operations for advanced usage\nexport { GraphQLOperations } from \"./portal/operations.js\";\n// Re-export types and constants\nexport type {\n AttestationData,\n AttestationInfo,\n AttestationRequest,\n DeploymentResult,\n EASClientOptions,\n EASFieldType,\n GetAttestationsOptions,\n GetSchemasOptions,\n RegisterSchemaOptions,\n SchemaData,\n SchemaField,\n SchemaRequest,\n TransactionResult,\n} from \"./schema.js\";\nexport { EAS_FIELD_TYPES, ZERO_ADDRESS, ZERO_BYTES32 } from \"./schema.js\";\n// Re-export validation utilities\nexport { EASClientOptionsSchema } from \"./utils/validation.js\";\n"],"mappings":";;;;;;;;AAEA,MAAa,oBAAoB;CAC/B,WAAW;EACT,sBAAsB,CAACA,YACrB,SAAS;;;;;;;;;WASJ;EAEP,WAAW,CAACA,YACV,SAAS;;;;;WAKJ;EAEP,gBAAg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A2B,MAAM,QAAQ;EAC3D;CACF;;;;CAKD,AAAO,aAA+B;AACpC,SAAO,EAAE,GAAG,KAAK,QAAS;CAC3B;;;;CAKD,AAAO,kBAA0C;AAC/C,SAAO,KAAK;CACb;;;;CAKD,AAAO,uBAAkF;AACvF,SAAO;GACL,YAAY,KAAK,QAAQ,sBAAsB,KAAK,mBAAmB;GACvE,uBACE,KAAK,QAAQ,iCAAiC,KAAK,mBAAmB;EACzE;CACF;CAED,AAAQ,gBAAyB;AAC/B,MAAI,KAAK,QAAQ,oBAAoB;AACnC,UAAO,KAAK,QAAQ;EACrB;AACD,MAAI,KAAK,mBAAmB,YAAY;AACtC,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MAAM;CACjB;CAED,AAAQ,2BAAoC;AAC1C,MAAI,KAAK,QAAQ,+BAA+B;AAC9C,UAAO,KAAK,QAAQ;EACrB;AACD,MAAI,KAAK,mBAAmB,uBAAuB;AACjD,UAAO,KAAK,kBAAkB;EAC/B;AACD,QAAM,IAAI,MACR;CAEH;CAED,AAAQ,kBAAkBC,QAA+B;AACvD,SAAO,OAAO,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,GAAG,MAAM,KAAK,EAAE,CAAC,KAAK,KAAK;CACvE;AACF;;;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,gBAAgBf,SAAsC;AACpE,QAAO,IAAI,UAAU;AACtB"}
1
+ {"version":3,"file":"eas.js","names":["graphql: PortalClient[\"graphql\"]","options: EASClientOptions","deployerAddress: Address","forwarderAddress?: Address","gasLimit?: string","request: SchemaRequest","fromAddress: Address","request: AttestationRequest","requests: AttestationRequest[]","schemaUID: Hex","attestationUID: Hex","value?: bigint","uid: Hex","_options?: GetSchemasOptions","_options?: GetAttestationsOptions","data: Hex","fields: SchemaField[]"],"sources":["../src/portal/operations.ts","../src/schema.ts","../src/utils/validation.ts","../src/eas.ts"],"sourcesContent":["import type { PortalClient } from \"./portal-client.js\";\n\nexport const GraphQLOperations = {\n mutations: {\n deploySchemaRegistry: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEASSchemaRegistry(\n $from: String!\n $constructorArguments: DeployContractEASSchemaRegistryInput!\n $gasLimit: String!\n ) {\n DeployContractEASSchemaRegistry(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n deployEAS: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation DeployContractEAS($from: String!, $constructorArguments: DeployContractEASInput!, $gasLimit: String!) {\n DeployContractEAS(from: $from, constructorArguments: $constructorArguments, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n registerSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASSchemaRegistryRegister(\n $address: String!\n $from: String!\n $input: EASSchemaRegistryRegisterInput!\n $gasLimit: String!\n ) {\n EASSchemaRegistryRegister(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n attest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASAttest($address: String!, $from: String!, $input: EASAttestInput!, $gasLimit: String!) {\n EASAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n multiAttest: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASMultiAttest($address: String!, $from: String!, $input: EASMultiAttestInput!, $gasLimit: String!) {\n EASMultiAttest(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n\n revoke: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n mutation EASRevoke($address: String!, $from: String!, $input: EASRevokeInput!, $gasLimit: String!) {\n EASRevoke(address: $address, from: $from, input: $input, gasLimit: $gasLimit) {\n transactionHash\n }\n }`),\n },\n\n queries: {\n getSchema: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASSchemaRegistryGetSchema($address: String!, $uid: String!) {\n EASSchemaRegistry(address: $address) {\n getSchema(uid: $uid) {\n uid\n resolver\n revocable\n schema\n }\n }\n }`),\n\n getAttestation: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetAttestation($address: String!, $uid: String!) {\n EAS(address: $address) {\n getAttestation(uid: $uid) {\n uid\n schema\n attester\n recipient\n time\n expirationTime\n revocable\n refUID\n data\n revocationTime\n }\n }\n }`),\n\n isAttestationValid: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASIsAttestationValid($address: String!, $uid: String!) {\n EAS(address: $address) {\n isAttestationValid(uid: $uid)\n }\n }`),\n\n getTimestamp: (graphql: PortalClient[\"graphql\"]) =>\n graphql(`\n query EASGetTimestamp($address: String!, $data: String!) {\n EAS(address: $address) {\n getTimestamp(data: $data)\n }\n }`),\n },\n};\n","import { type Address, type Hex, zeroAddress } from \"viem\";\nimport type { z } from \"zod\";\nimport type { EASClientOptionsSchema } from \"./utils/validation.js\";\n\n/**\n * Common address constants\n */\nexport const ZERO_ADDRESS = zeroAddress;\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\" as Hex;\n\n/**\n * Supported field types for EAS schema fields.\n * Maps to the Solidity types that can be used in EAS schemas.\n */\nexport const EAS_FIELD_TYPES = {\n string: \"string\",\n address: \"address\",\n bool: \"bool\",\n bytes: \"bytes\",\n bytes32: \"bytes32\",\n uint256: \"uint256\",\n int256: \"int256\",\n uint8: \"uint8\",\n int8: \"int8\",\n} as const;\n\nexport type EASFieldType = keyof typeof EAS_FIELD_TYPES;\n\n/**\n * Represents a single field in an EAS schema.\n */\nexport interface SchemaField {\n /** The name of the field */\n name: string;\n /** The Solidity type of the field */\n type: EASFieldType;\n /** Optional description of the field's purpose */\n description?: string;\n}\n\n/**\n * Configuration options for the EAS client\n */\nexport type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;\n\n/**\n * Schema registration request\n */\nexport interface SchemaRequest {\n /** Schema fields (alternative to schema string) */\n fields?: SchemaField[];\n /** Raw schema string (alternative to fields) */\n schema?: string;\n /** Resolver contract address (use ZERO_ADDRESS for no resolver) */\n resolver: Address;\n /** Whether attestations using this schema can be revoked */\n revocable: boolean;\n}\n\n/**\n * Attestation data structure\n */\nexport interface AttestationData {\n /** Recipient of the attestation */\n recipient: Address;\n /** Expiration time (0 for no expiration) */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID (use ZERO_BYTES32 for no reference) */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Attestation request\n */\nexport interface AttestationRequest {\n /** Schema UID to attest against */\n schema: Hex;\n /** Attestation data */\n data: AttestationData;\n}\n\n/**\n * Transaction result\n */\nexport interface TransactionResult {\n /** Transaction hash */\n hash: Hex;\n /** Whether the transaction was successful */\n success: boolean;\n}\n\n/**\n * Schema information\n */\nexport interface SchemaData {\n /** Schema UID */\n uid: Hex;\n /** Resolver contract address */\n resolver: Address;\n /** Whether attestations can be revoked */\n revocable: boolean;\n /** Schema string */\n schema: string;\n}\n\n/**\n * Attestation information\n */\nexport interface AttestationInfo {\n /** Attestation UID */\n uid: Hex;\n /** Schema UID */\n schema: Hex;\n /** Address that created the attestation */\n attester: Address;\n /** Recipient of the attestation */\n recipient: Address;\n /** Creation timestamp */\n time: bigint;\n /** Expiration timestamp */\n expirationTime: bigint;\n /** Whether this attestation can be revoked */\n revocable: boolean;\n /** Reference UID */\n refUID: Hex;\n /** Encoded attestation data */\n data: Hex;\n /** Value sent with the attestation */\n value: bigint;\n}\n\n/**\n * Options for retrieving schemas\n */\nexport interface GetSchemasOptions {\n /** Maximum number of schemas to return */\n limit?: number;\n /** Number of schemas to skip */\n offset?: number;\n}\n\n/**\n * Options for retrieving attestations\n */\nexport interface GetAttestationsOptions {\n /** Maximum number of attestations to return */\n limit?: number;\n /** Number of attestations to skip */\n offset?: number;\n /** Filter by schema UID */\n schema?: Hex;\n /** Filter by attester address */\n attester?: Address;\n /** Filter by recipient address */\n recipient?: Address;\n}\n\n/**\n * Contract deployment result\n */\nexport interface DeploymentResult {\n /** Deployed EAS contract address */\n easAddress: Address;\n /** Deployed Schema Registry contract address */\n schemaRegistryAddress: Address;\n /** EAS deployment transaction hash (when address not immediately available) */\n easTransactionHash?: Hex;\n /** Schema Registry deployment transaction hash (when address not immediately available) */\n schemaRegistryTransactionHash?: Hex;\n}\n\n/**\n * @deprecated Use SchemaRequest instead\n * @internal\n */\nexport interface RegisterSchemaOptions extends SchemaRequest {}\n","import { ApplicationAccessTokenSchema, UrlSchema } from \"@settlemint/sdk-utils/validation\";\nimport { type Address, isAddress } from \"viem\";\nimport { z } from \"zod\";\n\nconst ethAddressSchema = z.custom<Address>(\n (val) => typeof val === \"string\" && isAddress(val),\n \"Invalid Ethereum address\",\n);\n\n/**\n * Zod schema for EASClientOptions.\n */\nexport const EASClientOptionsSchema = z.object({\n /**\n * The EAS instance URL\n */\n instance: UrlSchema,\n /**\n * The application access token\n */\n accessToken: ApplicationAccessTokenSchema.optional(),\n /**\n * The EAS contract address\n */\n easContractAddress: ethAddressSchema.optional(),\n /**\n * The schema registry contract address\n */\n schemaRegistryContractAddress: ethAddressSchema.optional(),\n /**\n * Whether to enable debug mode\n */\n debug: z.boolean().optional(),\n});\n","import { createPortalClient, waitForTransactionReceipt } from \"@settlemint/sdk-portal\";\nimport { createLogger, requestLogger } from \"@settlemint/sdk-utils/logging\";\nimport { validate } from \"@settlemint/sdk-utils/validation\";\nimport type { Address, Hex } from \"viem\";\nimport { GraphQLOperations } from \"./portal/operations.js\";\nimport type { PortalClient } from \"./portal/portal-client.js\";\nimport type { introspection } from \"./portal/portal-env.d.ts\";\nimport {\n type AttestationInfo,\n type AttestationRequest,\n type DeploymentResult,\n type EASClientOptions,\n type GetAttestationsOptions,\n type GetSchemasOptions,\n type SchemaData,\n type SchemaField,\n type SchemaRequest,\n type TransactionResult,\n ZERO_ADDRESS,\n} from \"./schema.js\";\nimport { EASClientOptionsSchema } from \"./utils/validation.js\";\n\nconst LOGGER = createLogger();\n\nconst DEFAULT_GAS_LIMIT = \"0x3d0900\";\n\n/**\n * Main EAS client class for interacting with Ethereum Attestation Service via Portal\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Deploy EAS contracts\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * console.log(\"EAS deployed at:\", deployment.easAddress);\n * ```\n */\nexport class EASClient {\n private readonly options: EASClientOptions;\n private readonly portalClient: PortalClient[\"client\"];\n private readonly portalGraphql: PortalClient[\"graphql\"];\n private deployedAddresses?: DeploymentResult;\n\n /**\n * Create a new EAS client instance\n *\n * @param options - Configuration options for the EAS client\n */\n constructor(options: EASClientOptions) {\n this.options = validate(EASClientOptionsSchema, options);\n\n const { client: portalClient, graphql: portalGraphql } = createPortalClient<{\n introspection: introspection;\n disableMasking: true;\n scalars: {\n // Change unknown to the type you are using to store metadata\n JSON: unknown;\n };\n }>(\n {\n instance: this.options.instance,\n accessToken: this.options.accessToken,\n },\n {\n fetch: requestLogger(LOGGER, \"portal\", fetch) as typeof fetch,\n },\n );\n\n this.portalClient = portalClient;\n this.portalGraphql = portalGraphql;\n }\n\n /**\n * Deploy EAS contracts via Portal\n *\n * @param deployerAddress - The address that will deploy the contracts\n * @param forwarderAddress - Optional trusted forwarder address (defaults to zero address)\n * @param gasLimit - Optional gas limit for deployment transactions (defaults to \"0x7a1200\")\n * @returns Promise resolving to deployment result with contract addresses and transaction hashes\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const deployment = await easClient.deploy(\n * \"0x1234567890123456789012345678901234567890\", // deployer address\n * \"0x0000000000000000000000000000000000000000\", // forwarder (optional)\n * \"0x7a1200\" // gas limit (optional)\n * );\n *\n * console.log(\"Schema Registry:\", deployment.schemaRegistryAddress);\n * console.log(\"EAS Contract:\", deployment.easAddress);\n * ```\n */\n public async deploy(\n deployerAddress: Address,\n forwarderAddress?: Address,\n gasLimit?: string,\n ): Promise<DeploymentResult> {\n const defaultForwarder = forwarderAddress || ZERO_ADDRESS;\n const defaultGasLimit = gasLimit || \"0x7a1200\";\n\n try {\n // Deploy Schema Registry first\n const schemaRegistryResponse = await this.portalClient.request(\n GraphQLOperations.mutations.deploySchemaRegistry(this.portalGraphql),\n {\n from: deployerAddress,\n constructorArguments: {\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n },\n );\n\n if (!schemaRegistryResponse.DeployContractEASSchemaRegistry?.transactionHash) {\n throw new Error(\"Schema Registry deployment failed - no transaction hash returned\");\n }\n\n const schemaRegistryTxHash = schemaRegistryResponse.DeployContractEASSchemaRegistry.transactionHash;\n\n // Wait for Schema Registry deployment and get contract address\n const schemaRegistryTransaction = await waitForTransactionReceipt(schemaRegistryTxHash as Hex, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!schemaRegistryTransaction?.receipt?.contractAddress) {\n throw new Error(\"Schema Registry deployment failed - could not get contract address from transaction receipt.\");\n }\n\n const schemaRegistryAddress = schemaRegistryTransaction.receipt.contractAddress;\n\n // Deploy EAS contract with correct Schema Registry address\n const easResponse = await this.portalClient.request(GraphQLOperations.mutations.deployEAS(this.portalGraphql), {\n from: deployerAddress,\n constructorArguments: {\n registry: schemaRegistryAddress,\n forwarder: defaultForwarder,\n },\n gasLimit: defaultGasLimit,\n });\n if (!easResponse.DeployContractEAS?.transactionHash) {\n throw new Error(\"EAS deployment failed - no transaction hash returned\");\n }\n\n const easTxHash = easResponse.DeployContractEAS.transactionHash as Hex;\n\n // Wait for EAS deployment and get contract address\n const easTransaction = await waitForTransactionReceipt(easTxHash, {\n portalGraphqlEndpoint: this.options.instance,\n accessToken: this.options.accessToken,\n timeout: 60_000,\n });\n\n if (!easTransaction?.receipt?.contractAddress) {\n throw new Error(\"EAS deployment failed - could not get contract address from transaction receipt.\");\n }\n const easAddress = easTransaction.receipt.contractAddress;\n\n this.deployedAddresses = {\n easAddress,\n schemaRegistryAddress,\n easTransactionHash: easTxHash as Hex,\n schemaRegistryTransactionHash: schemaRegistryTxHash as Hex,\n };\n\n return this.deployedAddresses;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to deploy EAS contracts: ${error.message}`);\n }\n }\n\n /**\n * Register a new schema in the EAS Schema Registry\n *\n * @param request - Schema registration request containing schema definition\n * @param fromAddress - Address that will register the schema\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const schemaResult = await easClient.registerSchema(\n * {\n * schema: \"uint256 eventId, uint8 voteIndex\",\n * resolver: \"0x0000000000000000000000000000000000000000\",\n * revocable: true\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Schema registered:\", schemaResult.hash);\n * ```\n */\n public async registerSchema(\n request: SchemaRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n let schemaString = request.schema;\n if (request.fields && !schemaString) {\n schemaString = this.buildSchemaString(request.fields);\n }\n\n if (!schemaString) {\n throw new Error(\"Schema string is required. Provide either 'schema' or 'fields'.\");\n }\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.registerSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n from: fromAddress,\n input: {\n schema: schemaString,\n resolver: request.resolver,\n revocable: request.revocable,\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASSchemaRegistryRegister?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to register schema: ${error.message}`);\n }\n }\n\n /**\n * Create an attestation\n *\n * @param request - Attestation request containing schema and data\n * @param fromAddress - Address that will create the attestation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const attestationResult = await easClient.attest(\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0), // No expiration\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\", // ABI-encoded data\n * value: BigInt(0)\n * }\n * },\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Attestation created:\", attestationResult.hash);\n * ```\n */\n public async attest(\n request: AttestationRequest,\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.attest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n request: {\n schema: request.schema,\n data: {\n recipient: request.data.recipient,\n expirationTime: request.data.expirationTime.toString(),\n revocable: request.data.revocable,\n refUID: request.data.refUID,\n data: request.data.data,\n value: request.data.value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create attestation: ${error.message}`);\n }\n }\n\n /**\n * Create multiple attestations in a single transaction\n *\n * @param requests - Array of attestation requests\n * @param fromAddress - Address that will create the attestations\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const multiAttestResult = await easClient.multiAttest(\n * [\n * {\n * schema: \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n * data: {\n * recipient: \"0x1234567890123456789012345678901234567890\",\n * expirationTime: BigInt(0),\n * revocable: true,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x1234\",\n * value: BigInt(0)\n * }\n * },\n * {\n * schema: \"0x5678901234567890123456789012345678901234567890123456789012345678\",\n * data: {\n * recipient: \"0x5678901234567890123456789012345678901234\",\n * expirationTime: BigInt(0),\n * revocable: false,\n * refUID: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n * data: \"0x5678\",\n * value: BigInt(0)\n * }\n * }\n * ],\n * \"0x1234567890123456789012345678901234567890\" // from address\n * );\n *\n * console.log(\"Multiple attestations created:\", multiAttestResult.hash);\n * ```\n */\n public async multiAttest(\n requests: AttestationRequest[],\n fromAddress: Address,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n if (requests.length === 0) {\n throw new Error(\"At least one attestation request is required\");\n }\n\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.multiAttest(this.portalGraphql), {\n address: easAddress,\n from: fromAddress,\n input: {\n multiRequests: requests.map((req) => ({\n schema: req.schema,\n data: [\n {\n recipient: req.data.recipient,\n expirationTime: req.data.expirationTime.toString(),\n revocable: req.data.revocable,\n refUID: req.data.refUID,\n data: req.data.data,\n value: req.data.value?.toString() || \"0\",\n },\n ],\n })),\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASMultiAttest?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to create multiple attestations: ${error.message}`);\n }\n }\n\n /**\n * Revoke an existing attestation\n *\n * @param schemaUID - UID of the schema used for the attestation\n * @param attestationUID - UID of the attestation to revoke\n * @param fromAddress - Address that will revoke the attestation\n * @param value - Optional ETH value to send with the revocation\n * @param gasLimit - Optional gas limit for the transaction (defaults to \"0x3d0900\")\n * @returns Promise resolving to transaction result\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * const revokeResult = await easClient.revoke(\n * \"0x1234567890123456789012345678901234567890123456789012345678901234\", // schema UID\n * \"0x5678901234567890123456789012345678901234567890123456789012345678\", // attestation UID\n * \"0x1234567890123456789012345678901234567890\", // from address\n * BigInt(0) // value (optional)\n * );\n *\n * console.log(\"Attestation revoked:\", revokeResult.hash);\n * ```\n */\n public async revoke(\n schemaUID: Hex,\n attestationUID: Hex,\n fromAddress: Address,\n value?: bigint,\n gasLimit?: string,\n ): Promise<TransactionResult> {\n try {\n const response = await this.portalClient.request(GraphQLOperations.mutations.revoke(this.portalGraphql), {\n address: this.getEASAddress(),\n from: fromAddress,\n input: {\n request: {\n schema: schemaUID,\n data: {\n uid: attestationUID,\n value: value?.toString() || \"0\",\n },\n },\n },\n gasLimit: gasLimit || DEFAULT_GAS_LIMIT,\n });\n\n const transactionHash = response.EASRevoke?.transactionHash;\n\n if (!transactionHash) {\n throw new Error(\"No transaction hash returned from Portal\");\n }\n\n return {\n hash: transactionHash as Hex,\n success: true,\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to revoke attestation: ${error.message}`);\n }\n }\n\n /**\n * Get a schema by UID\n */\n public async getSchema(uid: Hex): Promise<SchemaData> {\n const schemaRegistryAddress = this.getSchemaRegistryAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getSchema(this.portalGraphql), {\n address: schemaRegistryAddress,\n uid: uid,\n });\n\n const schemaResult = response.EASSchemaRegistry?.getSchema;\n\n if (!schemaResult) {\n throw new Error(`Schema not found: ${uid}`);\n }\n\n return {\n uid: schemaResult.uid as Hex,\n resolver: schemaResult.resolver as Address,\n revocable: Boolean(schemaResult.revocable),\n schema: schemaResult.schema || \"\",\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get schema: ${error.message}`);\n }\n }\n\n /**\n * Get all schemas with pagination\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all schemas.\n * Consider using getSchema() for individual schema lookups.\n */\n public async getSchemas(_options?: GetSchemasOptions): Promise<SchemaData[]> {\n throw new Error(\n \"Schema listing not implemented yet. Portal's direct contract queries don't support listing all schemas. Use getSchema() for individual schema lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Get an attestation by UID\n */\n public async getAttestation(uid: Hex): Promise<AttestationInfo> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getAttestation(this.portalGraphql), {\n address: easAddress,\n uid: uid,\n });\n\n const attestationResult = response.EAS?.getAttestation;\n\n if (!attestationResult) {\n throw new Error(`Attestation not found: ${uid}`);\n }\n\n return {\n uid: attestationResult.uid as Hex,\n schema: attestationResult.schema as Hex,\n attester: attestationResult.attester as Address,\n recipient: attestationResult.recipient as Address,\n time: attestationResult.time ? BigInt(attestationResult.time) : BigInt(0),\n expirationTime: attestationResult.expirationTime ? BigInt(attestationResult.expirationTime) : BigInt(0),\n revocable: Boolean(attestationResult.revocable),\n refUID: attestationResult.refUID as Hex,\n data: attestationResult.data as Hex,\n value: BigInt(0), // Note: Portal schema doesn't include value, defaulting to 0\n };\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get attestation: ${error.message}`);\n }\n }\n\n /**\n * Get attestations with pagination and filtering\n *\n * Note: This method requires The Graph subgraph or additional indexing infrastructure\n * as Portal's direct contract queries don't support listing all attestations.\n * Consider using getAttestation() for individual attestation lookups.\n */\n public async getAttestations(_options?: GetAttestationsOptions): Promise<AttestationInfo[]> {\n throw new Error(\n \"Attestation listing not implemented yet. Portal's direct contract queries don't support listing all attestations. Use getAttestation() for individual attestation lookups or implement The Graph subgraph integration for bulk queries.\",\n );\n }\n\n /**\n * Check if an attestation is valid\n */\n public async isValidAttestation(uid: Hex): Promise<boolean> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(\n GraphQLOperations.queries.isAttestationValid(this.portalGraphql),\n {\n address: easAddress,\n uid: uid,\n },\n );\n\n return response.EAS?.isAttestationValid ?? false;\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to check attestation validity: ${error.message}`);\n }\n }\n\n /**\n * Get the timestamp for specific data\n *\n * @param data - The data to get timestamp for\n * @returns The timestamp when the data was timestamped\n */\n public async getTimestamp(data: Hex): Promise<bigint> {\n const easAddress = this.getEASAddress();\n\n try {\n const response = await this.portalClient.request(GraphQLOperations.queries.getTimestamp(this.portalGraphql), {\n address: easAddress,\n data: data,\n });\n\n const timestampResult = response.EAS?.getTimestamp;\n\n if (timestampResult === undefined || timestampResult === null) {\n throw new Error(`No timestamp found for data: ${data}`);\n }\n\n return BigInt(timestampResult);\n } catch (err) {\n const error = err as Error;\n throw new Error(`Failed to get timestamp: ${error.message}`);\n }\n }\n\n /**\n * Get client configuration\n */\n public getOptions(): EASClientOptions {\n return { ...this.options };\n }\n\n /**\n * Get the Portal client instance for advanced operations\n */\n public getPortalClient(): PortalClient[\"client\"] {\n return this.portalClient;\n }\n\n /**\n * Get current contract addresses\n */\n public getContractAddresses(): { easAddress?: Address; schemaRegistryAddress?: Address } {\n return {\n easAddress: this.options.easContractAddress || this.deployedAddresses?.easAddress,\n schemaRegistryAddress:\n this.options.schemaRegistryContractAddress || this.deployedAddresses?.schemaRegistryAddress,\n };\n }\n\n private getEASAddress(): Address {\n if (this.options.easContractAddress) {\n return this.options.easContractAddress;\n }\n if (this.deployedAddresses?.easAddress) {\n return this.deployedAddresses.easAddress;\n }\n throw new Error(\"EAS contract address not available. Please provide it in options or deploy contracts first.\");\n }\n\n private getSchemaRegistryAddress(): Address {\n if (this.options.schemaRegistryContractAddress) {\n return this.options.schemaRegistryContractAddress;\n }\n if (this.deployedAddresses?.schemaRegistryAddress) {\n return this.deployedAddresses.schemaRegistryAddress;\n }\n throw new Error(\n \"Schema Registry contract address not available. Please provide it in options or deploy contracts first.\",\n );\n }\n\n private buildSchemaString(fields: SchemaField[]): string {\n return fields.map((field) => `${field.type} ${field.name}`).join(\", \");\n }\n}\n\n/**\n * Create an EAS client instance\n *\n * @param options - Configuration options for the EAS client\n * @returns EAS client instance\n *\n * @example\n * ```typescript\n * import { createEASClient } from \"@settlemint/sdk-eas\";\n *\n * const easClient = createEASClient({\n * instance: \"https://your-portal-instance.settlemint.com\",\n * accessToken: \"your-access-token\"\n * });\n *\n * // Use the client\n * const deployment = await easClient.deploy(\"0x1234...deployer-address\");\n * ```\n */\nexport function createEASClient(options: EASClientOptions): EASClient {\n return new EASClient(options);\n}\n\n// Re-export GraphQL operations for advanced usage\nexport { GraphQLOperations } from \"./portal/operations.js\";\n// Re-export types and constants\nexport type {\n AttestationData,\n AttestationInfo,\n AttestationRequest,\n DeploymentResult,\n EASClientOptions,\n EASFieldType,\n GetAttestationsOptions,\n GetSchemasOptions,\n RegisterSchemaOptions,\n SchemaData,\n SchemaField,\n SchemaRequest,\n TransactionResult,\n} from \"./schema.js\";\nexport { EAS_FIELD_TYPES, ZERO_ADDRESS, ZERO_BYTES32 } from \"./schema.js\";\n// Re-export validation utilities\nexport { EASClientOptionsSchema } from \"./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B;AACvD,SAAO,OAAO,IAAI,CAAC,UAAU,GAAG,MAAM,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC,CAAC,KAAK,KAAK;CACvE;AACF;;;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,gBAAgBf,SAAsC;AACpE,QAAO,IAAI,UAAU;AACtB"}
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.5.5-prfc0fb3b8",
4
+ "version": "2.5.6-pr36157bee",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "license": "FSL-1.1-MIT",
@@ -52,8 +52,8 @@
52
52
  },
53
53
  "devDependencies": {},
54
54
  "dependencies": {
55
- "@settlemint/sdk-portal": "2.5.5-prfc0fb3b8",
56
- "@settlemint/sdk-utils": "2.5.5-prfc0fb3b8",
55
+ "@settlemint/sdk-portal": "2.5.6-pr36157bee",
56
+ "@settlemint/sdk-utils": "2.5.6-pr36157bee",
57
57
  "gql.tada": "^1",
58
58
  "viem": "^2",
59
59
  "zod": "^4"